- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Good afternoon, I was wondering if someone could write a lisp routine for a task I often have to manually perform. I use solid modeling in Autocad and export the solids as an .stl file for various applications. Exporting .stl files from Autocad is a bit outdated in its functionality, and sometimes it wastes a ton of time for specific circumstances, such as needing to export many solid objects (that are not unioned as one item). My issue is I have many objects (on a shared layer) that I want to export as individual files but I don't want them all unioned prior to export. So instead of me having to manually click each solid object, then give it a filename, then export it to a specific folder (the default folder is simply the Documents folder in windows 10), then repeat this process for each object on that layer, is there a lisp routine that can automate this in a single click?
I would like for the lisp to:
1.) isolate a specific layer that I click (basically just the LAYISO command)
2.) randomly select a single 3D solid object on that isolated layer
3.) export that single 3D solid object as a binary .stl to the Documents folder with the filename of 1.stl
4.) delete that 3D solid object from the drawing
5.) repeat steps 2 thru 4, naming each successive .stl file 2.stl, 3.stl, 4.stl, etc. until all objects on that isolated layer have been exported and deleted.
The reason I want each solid object deleted is so I can quickly verify that ALL objects on that isolated layer were in fact affected by the lisp routine.
This should result in the Documents folder containing potentially a few hundred .stl files, since many of my drawings require hundreds or even thousands of separate 3D objects that I'd like to export as individual files.
Would any of you lisp wizards care to take a stab at this? Thank you!
tobi
Solved! Go to Solution.