Cut _SizeX and Cut_SizeY vars in Sheetmetal

Valued Contributor
Valued Contributor

How can I access Cut_Size vars? I used Solid Edge Spy to look for them but they are not stored under Variables or PMI´s. I can access Cut  Max Sizes but not the real Size of the sheetmetal. 

 

Best wishes

Ramón del Aguila

 

 

 

 

3 REPLIES

Re: Cut _SizeX and Cut_SizeY vars in Sheetmetal

Solution Partner Pioneer Solution Partner Pioneer
Solution Partner Pioneer
Cut size values can be found in the variable table, but they are dimensions, not variables. This has been covered many time before on this forum. You'll need to access these values through a variable table query. This is one of the many posts that covers this:

https://community.plm.automation.siemens.com/t5/Solid-Edge-Developer-Forum/Reading-Assembly-Variable...

Cheers,
Dave

Re: Cut _SizeX and Cut_SizeY vars in Sheetmetal

Valued Contributor
Valued Contributor

I know there are variables and dimensions but even using the code you linked I cannot extract the CutSizeX and CutsizeY. This is the code used 

 

Friend Shared Sub prueba(ByVal objdoc As SolidEdgeFramework.SolidEdgeDocument)
Dim PartVariables As SolidEdgeFramework.Variables = Nothing
Dim VarList As SolidEdgeFramework.VariableList = Nothing
PartVariables = DirectCast(objdoc.Variables, SolidEdgeFramework.Variables)
'==== query all dimensions and variables
VarList = DirectCast(PartVariables.Query("*",
Nothing, SolidEdgeConstants.VariableVarType.SeVariableVarTypeBoth, False), SolidEdgeFramework.VariableList)
' filter the list by Type Dimension
Dim Dims = VarList.OfType(Of SolidEdgeFrameworksupport.Dimension)()
' filter the list by Type variable
Dim Vars = VarList.OfType(Of SolidEdgeFramework.variable)()
For Each d As SolidEdgeFrameworkSupport.Dimension In Dims
Debug.WriteLine(d.Name)
Next
For Each v As SolidEdgeFramework.variable In Vars
Debug.WriteLine(v.Name)
Next

End Sub
 

 

And this is the result

 

Dimension 464
Dimension 470
Dimension 550
Dimension 687
Dimension 1121
Dimension 1131
Dimension 1133
MaterialThickness
BendRadius
ReliefWidth
ReliefLength
NeutralFactor
PhysicalProperties_Density
PhysicalProperties_Accuracy
MinimumArcLength
DeviationalTolerance
Flat_Pattern_Model_CutSize_MaximumX 
Flat_Pattern_Model_CutSize_MaximumY
CoVZ
CoVY
CopyConstruction_1_XScale
CopyConstruction_1_YScale
CopyConstruction_1_ZScale
CoVX
ContourFlange_1_DistOrAngleAtStart
ContourFlange_1_DistOrAngleAtEnd
ContourFlange_1_RadiusGlobal
ContourFlange_1_NeutralFactorGlobal
CoMZ
CoMY
Hole_1_Diameter
CoMX
Surface_Area
Volume
Izz
Mass_0
Ixy
PrincipalZAxisZ
Ixz
PrincipalXAxisX
Flatten_5_Suppress
K3
PrincipalXAxisY
Mass_2
K1
PrincipalXAxisZ
K2
PrincipalYAxisX
I3
Iyz
Mass_1
I1
Ixx
Iyy
I2
PrincipalZAxisY
PrincipalZAxisX
PrincipalYAxisZ
PrincipalYAxisY
Hole_3_Diameter

Re: Cut _SizeX and Cut_SizeY vars in Sheetmetal

Valued Contributor
Valued Contributor

Ok, I found the information needed with the following code

Dim X As Double = 0.0
        Dim Y As Double = 0.0

        flatPatternModel.GetCutSize(X, Y)

        Debug.Print(Math.Round((X * 1000), 2) & "*" & Math.Round((Y * 1000), 2))

Thanks