i have a problem , i’m scripting _OrientOnSrf with rhino.command :
Rhino.command " _-OrientOnSrf …
i’m using dash to suppress dialog box, but Rhino behaves like if all was checked in dialog box and didn’t retain any previous setting , i must input a scale factor and rotation angle each time, obviously i want to avoid this.
is there a way to control what is checked , what is uncheked by script ?
A : it’s possible
B : it’s impossible
C : May be …
D : Perhaps …
E: I don’t know …
F : I don’t care …
G: E & F !
F : What are you talking about man ?
G : Blue
H : You can use “50/50” or “Phone a Friend”
You should be able to specify everything on the command line. There will be some work to do - you will need to have the ID of the surface you want to orient onto (either preselect or…) the insertion point on the surface and the rotation/scale numbers…
These all need to be put together into one long command string to be passed to Rhino.Command(). Sometimes it takes some experimentation to get the order of arguments in the string correct.
Yes, all is working for me, except i can’t control ( or i don’t know how ) settings in dialog box when i use dash
i would like to uncheck both prompt ( scale and rotation ) , but seems when i use dash all dialog box options are checked by default, i don’t find parameters to control that.
You can’t do that, you will need to explicitly set the scale to 1 and the rotation to 0 in the command string, as well as all the other command line options in the correct order and formatting. Example:
VB (positively painful)
Call Test()
Sub Test()
Dim obj,bp,rp,targ,tp,comm
obj = Rhino.GetObject("Select object to orient")
bp = Rhino.GetPoint("Base point")
bp = Rhino.Pt2Str(bp)
rp = Rhino.GetPoint("Reference point")
rp = Rhino.Pt2Str(rp)
targ = Rhino.GetObject("Select target object")
tp = Rhino.GetPoint("Target point")
tp = Rhino.Pt2Str(tp)
comm = "_-OrientOnSrf _selID " & obj & " _Enter " & bp & " " & rp
comm = comm & " _SelID " & targ & " _Copy=_Yes _Flip=_No _IgnoreTrims=_No"
comm = comm & " _Rigid=_Yes " & tp & " 1.0 0.0 _Enter"
Call Rhino.Print(comm)
Call Rhino.Command(comm)
End Sub