I am creating a layer called folds and inside the layer am drawing a straight line. I want the line to be dashed, however, the line is getting drawn as a continuous line. I can change the continuous line to a dotted line manually but I want to do it through the code itself.
Below is my code (Where I add the line )
The line is getting added inside a layer called “Folds”.
I checked the rhino-api documentation and found the linetypes document however, there is no clue on how to implement the different line types through code.
I am new to rhino, so I believe I might have missed something.
Thank you for your answer. However even after I implemented it using your way, it does not make the line dashed. The line type index returns 1 so, the line type dashed is present. The line type of the “folds” layer is -1, however even if I try to set it to 1 using your code, it stays -1.
Since my “Folds” layer is a sublayer, (there is a parent layer called “layers for approval” I forgot to mention it in the first place, sorry!) I believe that’s what causing the issue
Edit:
Got it solved, i just set the line type before setting the parent layer and it worked. Thanks again Dale.