I'm having trouble keying in on the method to accomplish my goal:
Automate exporting DXFs of flat patterns, but add a sketch to the flattened part with the partnumber and revision.
Currently I have a library annotation that we can drag and drop onto the model, but the revision isn't added unto the file goes through a release transition in PDM, so the annotation is always out of date, and makes the file dirty. Plus we have to remember to place the annotation.
I'd like to get access to the bounding-box sketch in the flat pattern folder (or add a new sketch to the flattened body), then programmically add my part number and revision note, then export the DXF.
Exporting the DXF is easy. I need help on the sketch part. Ideas?
Flat Pattern Export DXF - Add sketched PN
- Jaylin Hochstetler
- Posts: 387
- Joined: Sat Mar 13, 2021 8:47 pm
- Location: Michigan
- x 380
- x 355
- Contact:
Re: Flat Pattern Export DXF - Add sketched PN
Attached is a video of how I would do it.
A macro could be made to do this. I am not a macro guru so I won't be able to help you make one.
A macro could be made to do this. I am not a macro guru so I won't be able to help you make one.
- Attachments
-
- Sketch Text.mp4
- (17.32 MiB) Downloaded 117 times
A goal is only a wish until backed by a plan.
-
- Posts: 98
- Joined: Thu Mar 18, 2021 11:19 am
- Location: St. Louis, MO
- x 288
- x 56
Re: Flat Pattern Export DXF - Add sketched PN
So the revision note is not supposed to match the revision property, correct? Just increment up one value? Where is the PN/rev note going to be located?
Austin
Re: Flat Pattern Export DXF - Add sketched PN
Simple solution would be to set up a drawing template and add a note to that which is linked to model properties. Now use the API to export to DXF using that template and you are good to go
Deepak Gupta
SOLIDWORKS Consultant/Blogger
SOLIDWORKS Consultant/Blogger
Re: Flat Pattern Export DXF - Add sketched PN
The note is made up from the item's part number ('NUMBER' in my case) and 'REVISION'. Before the PDM transition 'REVISION' property is set to a dash. It is set to a letter during the PDM transition.Austin Schukar wrote: ↑Thu Aug 12, 2021 10:12 am So the revision note is not supposed to match the revision property, correct? Just increment up one value? Where is the PN/rev note going to be located?
I was planning on doing some rough calculation to place the text at the center of the part. Pretty hard to ensure it is fully on the part, but as long as its on the DXF, I think it'll be ok.
Re: Flat Pattern Export DXF - Add sketched PN
I'd rather not use a drawing. I do not want the title block, just model geometry and part number text.
Re: Flat Pattern Export DXF - Add sketched PN
You can remove the title block from the drawing and just keep a plan sheet with the note. Add the geometry and export.
Deepak Gupta
SOLIDWORKS Consultant/Blogger
SOLIDWORKS Consultant/Blogger
- jcapriotti
- Posts: 1853
- Joined: Wed Mar 10, 2021 6:39 pm
- Location: The south
- x 1196
- x 1984
Re: Flat Pattern Export DXF - Add sketched PN
This is what we do. We have an empty drawing with a sheet set to 4' x 8' (although the sheet size doesn't affect anything). Put your part flattened and scaled 1:1 on the sheet. You can add additional text as needed.
We also use this method for adding special form/punches to layers. We can suppress the form/punch in the flat configuration and extract it's sketch into the drawing with convert entities and place that on a layer needed by the CNC software.
Jason