Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

For those people doing sheetmetal with SolidWorks

2,575 views
Skip to first unread message

SW Monkey

unread,
Jul 7, 2003, 9:22:37 AM7/7/03
to
What process do you use when converting your sheetmetal models for
manufacturing? Do you export as another file type, or do you use the
actual model itself?

Im trying to get an idea of what the majority of people in the
manufacturing industry that uses SolidWorks for sheetmetal does.

My company currently exports the flatpattern in a drawing as a dxf.
Then the dxf is converted to a GEO file by manufacturing. They then
use the GEO file to make a nest for the laser.

We have a hell of a time converting drawings to dxf, since the process
is somewhat somewhat long.

First we have to delete the sheet format, which has title block and
notes on it. Next we have to manually hide the bend lines. Clicking
"Hide All Types" doesnt hide these, although it looks like it does.
Then we have to scale the drawing view 1:1. Finnaly, we have to
export it as a DXF to a directory called N:\DXF.

This process is very cumbersome, expecially when you have 20+ drawings
to do this to. So that brings me to my first question. Im not very
knowledgable of the sheetmetal laser market, so if the process we are
using is the "old" way of doing things, maybe thats why SolidWorks
doesnt have an easy way to export flatpatterns for manufacturing.

If anyone has any suggestions/comments, please feel free to post a
reply. Thanks.

Ben

unread,
Jul 7, 2003, 9:38:04 AM7/7/03
to
I have made a macro to go through all my sheets and remove the title then
take the flat pattern to 1 to 1. I then use the multi sheet dxf out macro
(you can find it on the web somewhere, if not I will send it to you)

Ben

"SW Monkey" <google.50.s...@spamgourmet.com> wrote in message
news:aedbc5c7.03070...@posting.google.com...

Ray Reynolds

unread,
Jul 7, 2003, 9:42:25 AM7/7/03
to
We've created a drawing template that didn't have a boarder or formatting.
When we create our flats, we use this boarder and save as a DXF.

"SW Monkey" <google.50.s...@spamgourmet.com> wrote in message
news:aedbc5c7.03070...@posting.google.com...

Mark Reimer

unread,
Jul 7, 2003, 10:48:35 AM7/7/03
to
We created two macros. The first one takes a detail drawing and creates a
second sheet without a title block, inserts a flat pattern view of the model
if sheet metal, otherwise the front view, sets the view to HLR, sets it to
tangent edges removed, hides cosmetic threads and deletes any other
annotations that may have appeared. In the macro we use the function
"CreateFlatPatternViewFromModelView2" with hideBendLines set to "True". It
works very well. All that is left to do manually is hide any edges that
might exist from features in the model like countersink holes or chamfers.
We use a second macro to save the dxf to the appropriate folder.

From API help...

retval = DrawingDoc.CreateFlatPatternViewFromModelView2 ( modelName,
configName, locX, locY, locZ, hideBendLines )

Input: (BSTR) modelName Name of model
Input: (BSTR) configName Name of configuration
Input: (double) locX X coordinate
Input: (double) locY Y coordinate
Input: (double) locZ Z coordinate
Input: (VARIANT_BOOL) hideBendLines TRUE hides bend lines, FALSE does not

--Mark

"SW Monkey" <google.50.s...@spamgourmet.com> wrote in message
news:aedbc5c7.03070...@posting.google.com...

FrankW

unread,
Jul 7, 2003, 11:31:33 AM7/7/03
to
I'm a new user of SW here. most of the drawings I do is sheetmetal.
I did a survey of our sheetmetal shops we use to determine what they
would like from us.
They wanted a 3d model of the part in IGS or STEP format,unfolded.
And a pdf drawing of the detail information (paint spec,part number, etc).
They "did not" want an unfolded drawing as they will take care of that
themselves.

SW Monkey

unread,
Jul 7, 2003, 3:40:01 PM7/7/03
to
Mark and Ben, would it be possible for you to email me the macro?

d

unread,
Jul 7, 2003, 4:13:02 PM7/7/03
to
Not sure what is the best, but what is working for me is:

Create a template drawing file with several pages:
Page 1) Shows development of each profile, with each dimension and
angle. This is used for bending the part

Page 2) Proof sheet. This is used to dimension the part exactly as the
customer has dimensioned it to assure that they are the same.

Page 3) Flat pattern: Scale 1:1, no annotation. This is the page to
output for CAM.

Pages are added or removed as required. If you just want to export
DXF, add a sheet to the drawing file with no format and scaled 1:1.
Place your flat pattern there and export.
google.50.s...@spamgourmet.com (SW Monkey) wrote in message news:<aedbc5c7.03070...@posting.google.com>...

Corey Scheich

unread,
Jul 8, 2003, 11:41:49 AM7/8/03
to
We have been using Fabriwin for our NC for a Plasma Machine which I
understand that the NC code is very similar. Fabriwin has an OLE
integration to SolidWorks It takes the open part unfolds it if it
needs to be unfolded and imports the unfolded outline for the cut
path. Fabriwin is created by MetalSoft, based out of California.
They also sell a nesting software called Intelinest.

SW Monkey

unread,
Jul 10, 2003, 11:57:13 AM7/10/03
to
Mark, could you possibly send me that macro via email? If not, can
you explain what I can add to my existing macro to automatically hide
the bend lines? Thanks


"Mark Reimer" <mereimerR...@engineer.com> wrote in message news:<bec184$3eaiv$1...@ID-131937.news.dfncis.de>...

Mark Reimer

unread,
Jul 10, 2003, 1:58:31 PM7/10/03
to
I emailed it to you, but here is the code for anyone else who is interested.
I used a couple of predefined constants, so swConst.bas must be inported as
a module in the project.

'
****************************************************************************
**
' CutPattern.swp macro last edited on 07/10/03 by Mark Reimer
'
****************************************************************************
**
Dim swApp As Object
Dim Drawing As Object
Dim Model As Object
Dim Annotation As Object
Dim Sheet1 As Object
Dim View As Object
Dim ModelName As String
Dim Sketch As Object
Dim pAnnotation As Object

Sub main()
Dim Errors As Long
Dim Warnings As Long
Dim ModelExtension As String

Set swApp = CreateObject("SldWorks.Application")
Set Drawing = swApp.ActiveDoc

If Drawing Is Nothing Then
MsgBox ("Unable to attach to active document.")
Exit Sub
End If

If Drawing.GetType <> swDocDRAWING Then
MsgBox ("This macro only works with drawings.")
Exit Sub
End If

Set View = Drawing.GetFirstView 'The first view is the sheet

If View Is Nothing Then
MsgBox ("Unable to get sheet view.")
Exit Sub
End If

Set View = View.GetNextView ' The next view is actually the first model view

If View Is Nothing Then
MsgBox ("Unable to get model view.")
Exit Sub
End If

ModelName = View.GetReferencedModelName ' Get the model file name referenced
by the view
ModelExtension = Right(ModelName, 3) ' Get last 3 extension chars to
determine model type

If View.IsModelLoaded = False Then View.LoadModel 'if model is not loaded,
then load it

If UCase(ModelExtension) = "ASM" Then 'open the assembly silently to get
model object
Set Model = swApp.OpenDoc6(ModelName, swDocASSEMBLY,
swOpenDocOptions_Silent, "", Errors, Warnings)
ElseIf UCase(ModelExtension) = "PRT" Then 'open the part silently to get
model object
Set Model = swApp.OpenDoc6(ModelName, swDocPART,
swOpenDocOptions_Silent, "", Errors, Warnings)
End If

If Model Is Nothing Then 'If the model cannot be opened, then exit without
doing anything
MsgBox ("CutPattern Macro could not get model object.")
Exit Sub
End If


'Add the new sheet and name it
' Format: retval = DrawingDoc.NewSheet3 ( name, paperSize, templateIn,
scale1, scale2, firstAngle, templateName, width, height, propertyViewName )
If Drawing.NewSheet3("CutPattern", swDwgPaperAsize, swDwgTemplateNone, 1, 1,
0, "", 0.4318, 0.2794, "Default") = False Then
MsgBox ("CutPattern Macro could not create drawing sheet")
Exit Sub
End If

'Find out if the model is a sheet metal part
If Model.GetBendState = swSMBendStateNone Then 'model is not a sheet metal
part
Drawing.CreateDrawViewFromModelView ModelName, "*Front", 0.215, 0.135, 0
'Go with Front view if no Flat Pattern exists
Else ' model is a sheet metal part
Drawing.CreateFlatPatternViewFromModelView2 ModelName, "", 0.215, 0.135,
0, True 'insert a Flat Pattern view
End If

Drawing.ViewZoomtofit2 'Zoom to fit view on screen

'Get the newly inserted view
Set View = Drawing.GetFirstView
Set View = View.GetNextView

View.SetDisplayMode (swHIDDEN) 'Set view to "Hidden lines removed" (HLR)
View.SetDisplayTangentEdges2 (swTangentEdgesHidden) 'Set view to "Tangent
edges removed"

'Delete all annotations and hide cosmetic threads
Drawing.ClearSelection 'Clear all current selections

Dim gotsomething As Boolean 'initialize variable
gotsomething = False

Set pAnnotation = View.GetFirstAnnotation ' Get the first Annotation in the
View if any exist

' Loop through every Annotation in View
While (Not pAnnotation Is Nothing) 'If pAnnotation is nothing, then to
annotation was selected this time
gotsomething = True 'An annotation was found at pAnnotation.GetNext or
View.GetFirstAnnotation
pAnnotation.Select2 True, 0 'Add the gotten annotation to the selection
list
If pAnnotation.GetType = swCThread Then 'If annotation is a cosmetic
thread, then hide it
Drawing.HideCosmeticThread
End If
Set pAnnotation = pAnnotation.GetNext 'Get the next annotation
Wend

If gotsomething = True Then
Drawing.EditDelete 'delete any annotations that may have been selected
End If

End Sub


"SW Monkey" <google.50.s...@spamgourmet.com> wrote in message

news:aedbc5c7.03071...@posting.google.com...

Richard Charney

unread,
Jul 10, 2003, 4:37:59 PM7/10/03
to
Ray, this is exactly how we do it too. Seems to work pretty well for me.

"Ray Reynolds" <rrey...@riconcorp.com> wrote in message news:<5NeOa.57486$926.6884@sccrnsc03>...

SW Monkey

unread,
Jul 11, 2003, 1:29:35 AM7/11/03
to
I keep getting the "This macro only works with drawings" when I run
the macro. (I have a drawing open).

Could you email me the actual macro file again? The above email
address isnt good, try this one SLDWX.25.s...@spamgourmet.com.
Thanks.

"Mark Reimer" <mereimerR...@engineer.com> wrote in message news:<bek9g8$5v2ml$1...@ID-131937.news.uni-berlin.de>...

rocheey

unread,
Jul 11, 2003, 9:34:05 AM7/11/03
to
Ive got the entire process pretty much automated. Yes, the generation
of flat patterns takes a few minutes, but the overall time is shorter,
compared to, say, exporting a flat from autocad and then having to
hunt down the geometry errors. Anyway, I have the code installed as an
NT service, and it just wanders around the network(s) 24/7 just
*looking* for something new to unfold <grin>

I wrote my own DXF exporter, which accesses the geometry directly from
the view.
This allows me to ignore all BUT the geometry (no bend lines, datum
point, center marks, etc) and the scale issue is irrelevant (except
for translating the default mm API units to inch). I also wrote
exporters for our sheet metal application formats (Fabriwin .prt files
and Maker .prt files) so I have the option of exporting directly to
CAM.

There are a few issues which I dont see addressed in most sheet metal
export schemes:

1) The CreateFlatPatternViewFromModelView API call still returns TRUE
if the VIEW was successfully created, and not *necessarily* the flat
pattern. This means that if the part has errors and wont unfold,
you'll generate nothing but a view of the folded state. I do a rebuild
on the referenced configuration and check the return for errors first.

2) If the model has an older style, non-derived flat pattern
configuration,
(which isnt linked to a 'folded' config), a call to generate a flat
pattern view will still use the old config, even on newer installs of
SW. The features
on these non-derived flat configs are sometimes not updated with its
folded view
and you can then end up exporting the OLD version of the part.

So generally, I first check to see if the config is derived, and, if
not, check to see if any special features have been added AFTER the
flat pattern/process bends feature. If there are none, then Id have
the code delete this legacy flat config and create a new derived
config, using the same naming scheme.

rocheey

unread,
Jul 11, 2003, 9:41:07 AM7/11/03
to
> We have been using Fabriwin for our NC for a Plasma Machine which I
> understand that the NC code is very similar.

I use fabriwin myself, but for a laser. While Ive seen some
proprietary Plasma formats, normally G-Code can be very standard.


>> Fabriwin has an OLE integration to SolidWorks
>>It takes the open part unfolds it if it needs to be unfolded

Yes, well, I avoid that at all costs. First off, it fails if the part
has a Flat Pattern feature instead of the 'process bends' feature.
Secondly, fabriwin
only uses single-precision decimals internally in its format, and on
slight angles and/or non-quadrant arcs, the floating point returns
round off errors that create failures in nesting/common cutting, at
least when using the higher-precision needed for laser.

Mark Reimer

unread,
Jul 11, 2003, 11:58:32 AM7/11/03
to
This would happen if you did not include swConst.bas in the project because
swDocDRAWING is defined as 3 in there and would be 0 otherwise. You can
replace swDocDRAWING with 3, in the original code, but there are several
other constants that I used from swConst.bas, so the program will still not
work unless you were to search for all of them and replace them with the
numbered values found there.

The easiest way to make this work is while in the VB editor editing this
macro, select File, Import File from the main menu and browse for
swConst.bas. It should be found in the SolidWorks\samples\appComm folder.

If you did already import it then I'm not sure what the problem is, but I
will resend the original macro to you again at your newer address before it
also expires.

--Mark

Davis

unread,
Jul 11, 2003, 5:40:23 PM7/11/03
to
When we used Fabriwin, there was often geometry error - particularly
in filleted corners - that left open geometry and required repair. You
had to add the cut before you'de see the errors, though, and then go
back and fix them. Often if you missed an error there would be gaps in
the g-code. BTW, I hate Fabriwin for lots of other reasons.

We're now primarly using N-cell for nesting. This also requires clean
dxf's for the tool path.

I do a saveas from my SW drawing, highlighting the flat pattern view.
First turn off sketches, so the bend lines disappear. In the saveas
dialog, select dxf, then go to options to set the scale to 1:1.

Then I load the file into Autocad LT, copy and move the flat view, cut
the rest of the drawing, and double check that the scale is correct.

This sounds like a lot of work, but probably only takes 15 seconds.
We've done hundreds this way since changing to Ncell, with almost no
trouble.

SW Monkey

unread,
Jul 14, 2003, 1:44:12 PM7/14/03
to
davis_...@yahoo.com (Davis) wrote in message news:<a3e2b5ee.03071...@posting.google.com>...

> I do a saveas from my SW drawing, highlighting the flat pattern view.
> First turn off sketches, so the bend lines disappear. In the saveas
> dialog, select dxf, then go to options to set the scale to 1:1.

If you just do a "Hide Sketches" in the pull-down menu, it doesnt
truly hide the bend line, you can see this by moving your mouse over
where the bend line should be. Marks macro hides this though, works
great.

> Then I load the file into Autocad LT, copy and move the flat view, cut
> the rest of the drawing, and double check that the scale is correct.

Why not just delete the titleblock inside of SolidWorks? This would
save you from opening it in Autocad.

> This sounds like a lot of work, but probably only takes 15 seconds.
> We've done hundreds this way since changing to Ncell, with almost no
> trouble.

The procedure we use doesnt take that long either, about 10-15
seconds, but the more steps you have to do, the greater the chance of
an error. Checkout Marks macro he posted. It looks like it works
very well.

0 new messages