Hello Ladies and Gents,
My first post here.
I'm looking for your help programming gurus!
My initial topic is described and discussed in
hereBut discussion was left without resolution. Maybe Swamp community can resolve it. Thanks in advance.
Input data:
- I have mechanical assembly originally developed in Inventor. No access to original available.
- Original was exported to step/iges or other format. Information of format not available.
- Export format was imported into AutoCAD file. 1x DWG file
- Blocks, blocks names and nested blocks structure resembles original Inventor structure.
- Amount of blocks - more than 20k. Technically all those blocks are Inventor parts.
- Many blocks have duplicates. Ex. bolts, nuts, etc.
- DWG is set to UCS.
My task/issue:
- From DWG file I need to extract all blocks into separate DWG files and
retain UCS of parent DWG file, for all extracted blocks.
- Every extracted DWG file should be named in the name of the block it belonged
- If blocks are duplicated, they can be retained in 1 collective DWG file. Ex. original DWG, block name: M20 bolt -->> extracted DWG named M20 bolt, containing all M20 bolts from original DWG
--> Otherwise, they can be suffixed/prefixed with any chosen value.
--> Best to have both options if possible, collective dwg and possibility to extract duplicates as suffixed/prefixed.
Info:
- Test DWG attached
- Lisp file (not mine) attached. Lisp is already doing great work, however extracted DWG files are reset to WCS
Can you please suggest portion of code to be added to lisp file, such that extracted DWG files would not reset to WCS, but keep UCS of the parent file.
Thanks in advance!