Make2d set output layers

Hi,

is there a way to script make2d command with defining output layers in Rhino 7, in way like in Rhino 5?

in rhino 5 I was using

rs.Command(" -Make2D DrawingLayout=CurrentCplan "
+"ShowTangentEdges=Yes "
+"CreateHiddenLines=Yes "
+"MaintainSourceLayers=No "
+'VisibleLineLayer "CON visible" '
+'VisibleTangentsLayer "CON visible tan" '
+'HiddenLineLayer "CON hidden" '
+'HiddenTangentsLayer "CON hidden tan" '
+'AnnotationLineLayer "CON annotation" Enter ',
False)

I managed to script all except the output layers…

command =   "-_Make2D _Layout=CPlane _Properties=ByOutputLayers _CreateHiddenLines=Yes _ShowTangents=Yes _GroupOutput=No Enter Enter"  
rs.Command(command, False)

I could loop through the output curves and change their layer, but is there a direct way?

Thanks in advance,
Aleksandar

Hi @AleksandarSM,

Unlike Rhino 5, Rhino 6 has exposed all of the Make2d calculations to RhinoCommon. Thus, you no longer need to script the command. And since you seem to need more control of the output, I suggest you just write your own custom Make2d routine.

Here is an example of using HiddenLineDrawing.Compute:

SampleMake2dSnapshots.py

– Dale

Hi, I’ve been searching around for some info on how to do this myself. I’m running Rhino 8. I’d love to find a way to set up my Make2D to send hidden lines to a specific layer, or adjust the layer output settings and save them as a default somehow.

! _-Make2D _Pause _Layout=_View _Properties=_ByOutputLayers _CreateHiddenLines=_Yes _GroupOutput=_No _LayerName "Drawing01" _Enter _MultiPause _SelNone _-Layer _New "HiddenLines" _Enter _-SelLayer "Drawing01::Hidden::Curves" _-ChangeLayer "HiddenLines" _SelNone

this creates a new Layer called HiddenLines, then runs _Make2D, then moves from the Hidden::Curves sublayer to the newly created layer

Rhino_vzr41uitaz

Hi Dan, thank you for this. I hate to sound like a dummy but can you point me toward a tutorial that shows me what to do with this script? I know it goes into python but thats about a far as I can get. Thanks again!

hi @John_Records

this is not Python, but Rhinos Macro Scripting System. Check here: Creating Macros [McNeel Wiki]