I'm (unsuccessfully) trying to write a macro that'll automate saving a part profile (flat pattern or flat (unbent) part) to dxf for use at our waterjet.
Drawings typically contain one or more views, one of which will be the view I want. That view could be a flat pattern, or it could be a 'flat' part that we're simply cutting the profile of.
The manual steps I take now are:
- Open drawing
- Delete all views except the view I want to save out
- Window-select the entire sheet and delete all notes and annotations
- If view is a flat pattern, right click and hide bend lines
- Hide the sheet format
- Save the remaining part profile as DXF
None of this seems like it should be difficult to do in VBA, but with my limited knowledge I haven't been able to come close to making this work (the best I've done is gotten save as DXF to work). I used the macro recorder to try to hide the sheet format, but I can't get it to work, and running the recorded macro doesn't even work.
If anybody could help with some of this I'd really appreciate it. I'm willing to continue to try to make it work, but I'm getting nowhere on my own.
Thank you,
Brain
SolidworksApi macros