Since there is no native command in Rhino similar to the MLINE command in AutoCAD, I am going to implement one by myself. During my everyday work, I constantly need this function to draw plan walls, punch holes/windows/doors, etc. One magic thing about MLINE is that it can create merged cross automatically. I wonder whether there are any existing solutions out there. If not, any suggestions/tips on how this can be done beautifully?
Note: I am aware of the plugin VisualARQ, but it is an overkill simply for this feature.
What a pity! Please let me know whenever you find them or recall the basic procedures.
As I am starting coding, I run into two questions:
Is there a sample python code for drawing polyline using Rhinocommon which dynamically updates polyline with mouse (basically the same functionality with the native Polyline command)? How do I remove the Display.DrawLine if the user choose to Undo the last segment?
When I do getObject, can I set filter using userdata? For example, I may have some wall objects with custom “hallmarks”. And later when I do modification, I want to only select these wall objects.
Hi @vincentfs, you might take a look at events to do this. Whenever you modify the contents of the rhino document, various events are fired. You can “hook into” these events and add your own behaviour, however not all events can be used with python. There is some info about this here.