seatrout
Mechanical
- Jul 31, 2006
- 2
SolidWorks API Question:
I would like to be able to get the overall length and with of a parts flat pattern, programatically. Does anyone know how to do this without display dimensions?
I use the following to get the material thickness but the display dimension is automatically placed by SW when the part is built:
...snip
ElseIf sFeatName = "Sheet-Metal1" Then
Set swDsplyDim = swFeat.GetFirstDisplayDimension
Set swDim = swDsplyDim.GetDimension
vMaterialThickness = Format(swDim.Value, "#.000")
Set swDsplyDim = Nothing
Set swDim = Nothing
...snip end
Now, how can I get the length and width of the flat pattern?
I would like to be able to get the overall length and with of a parts flat pattern, programatically. Does anyone know how to do this without display dimensions?
I use the following to get the material thickness but the display dimension is automatically placed by SW when the part is built:
...snip
ElseIf sFeatName = "Sheet-Metal1" Then
Set swDsplyDim = swFeat.GetFirstDisplayDimension
Set swDim = swDsplyDim.GetDimension
vMaterialThickness = Format(swDim.Value, "#.000")
Set swDsplyDim = Nothing
Set swDim = Nothing
...snip end
Now, how can I get the length and width of the flat pattern?