Showing results for 
Search instead for 
Did you mean: 

Parametrized modelling

Valued Contributor
Valued Contributor

Hi, guys!

I have a 3D model with parameters. Where can I find methods to get table of parameters and to set parameters?




Posted by: Vladimir Krivov
Post date: 10/9/2011 7:27:41 PM


RE: Parametrized modelling

Valued Contributor
Valued Contributor

Try This SUB in or it can be converted to the langauge of your chioce.


Public Sub AssignParamValues(ByVal NewParameter As Double, ByVal ConversionValue As Double)

'' ConversionValue is necesary due to SE library handles everything in meters so depending on the model what units is using

'' it needs to be converted

'' MyParameterName is the variable name in the variable table and it must be exposed

'' This Example works with assembly if it needs to be aplied to a different document change the declaratiion

Dim ObjApp As SolidEdgeFramework.Application = Nothing

Dim ObjDoc As SolidEdgeAssembly.AssemblyDocument = Nothing



ObjApp = Marshal.GetActiveObject("SolidEdge.Application")

ObjDoc = ObjApp.ActiveDocument



ObjDoc.Variables("MyParameterName").value() = NewParameter * ConversionValue



Catch ex As Exception

ObjApp = Nothing

If Err.Number 0 Then


MsgBox("Solid Edge is not running. Open SE first")

End If


If Not (ObjApp Is Nothing) Then


ObjApp = Nothing

End If

If Not (ObjDoc Is Nothing) Then


ObjDoc = Nothing

End If


End Try


End Sub





Posted by: Sergio Vallejo
Post date: 10/10/2011 2:50:23 AM