Help for macro in Rhino

!  Select _Pause_Join_Enter_MergeAllCoplanarFaces_Enter 

I want a macro to run
joint(selected face or surface),and, merge all coplanerface in a row, but why not?

Can anyone help me?
@Helvetosaur

i started abandoning the underscores, it gives me consistent results without problems, i dont know for sure if these are the real problem but anyway it works when you type:

! Select Pause Join Enter MergeAllCoplanarFaces Enter

notice i am running rhino 7 in english, so that may still not work when you have a different language running.

edit: ok it seems you have to implement space between each underscore if you wish to use the macro for different langauges:

! _Select _Pause _Join _Enter _MergeAllCoplanarFaces _Enter

https://docs.mcneel.com/rhino/7/help/en-us/index.htm#information/rhinoscripting.htm?Highlight=underscore

1 Like

thank you(It was ok with this type of writing)
@encephalon @Helvetosaur
Can you help me with how to write this macro correctly as it still does not work?
! _Select _Pause _Join _Enter_SelLast_BooleanUnion_Enter_MergeAllCoplanarFaces _Enter
jj

if you are using an older Rhino try:

! _Select _Pause _Join _Enter _MergeAllFaces _Enter

The previous macro was run. I have a problem with this macro. This macro adds an ‍‍‍‍‍‍‍Enter_SelLast_BooleanUnion compared to the previous one.

! _Select _Pause _Join _Enter_SelLast_BooleanUnion_Enter_MergeAllCoplanarFaces _Enter

ok ic, sorry misread that.

it seems you are missing some spacings and trying to combine commands which do not make sense. or maybe they do, but join then boolean union? i am not sure. could you post a typical file where that should work?

i am thinking if you have several surfaces adjoining at the same edge they may join different as expected and you end up with non solids, using then boolean union might give you wrong results.

edit:
hmm strange i tested it on 3 simple exploded cubes and it seems joining them wrong does not matter much to boolean union. but that could just be coincidental, i would watch out at least.

so

! _Select _Pause _Join _Enter _SelLast _BooleanUnion _Enter _MergeAllCoplanarFaces _Enter

should work

No it does not work

you are running Rhino 7? i guess the syntax is different on windows because it works on mac. @Helvetosaur could you check the syntax for windows?

yes rhino7 windows

and you copied my corrected version into the macro editor? if so what kind of message did it output?

Rhino 7 SR4 2021-2-3

What is it exactly that you are trying to accomplish with this macro? A bunch of things could possibly fail, including joining and the fact that there needs to be at least two intersecting surface/polysurface objects for BooleanUnion to do anything.

Well, not having seen the actual program, something like that might work via Grasshopper because it is capable of making some decisions that macros are not, but in general I do not think this kind of operation will be reliable at all in macro form.

If it is going to work, the following macro might be used:

! _Select _Pause _Join
_SelLast _BooleanUnion
_SelLast _MergeAllCoplanarFaces