|
DigiPara Liftdesigner LDX API
|
API method: ILDXFactory5.CreateMatrix
' from Samples/Src/LDXAPIExamples/Example_LDXHideCS.vb
<APIHelpAttribute(APIHelpModes.None, {APIHelpModes.InputParaLDXApp}, "", "LDXFactory~CreateMatrix", "Creating Matrices and Vectors")>
Public Shared Sub CreateMatrixAndVector(ByRef ldxApplication As DigiPara.LDX.LDXApplication)
' managed matrices and vectors are accessible via the Factory object
Dim ldxFactory = ldxApplication.Factory
' call the appropriate create method; the object lifetime is managed by
' .NET and anything created by a ldxFactory.Create... method is garbage
' collected when no longer used.
Dim ldxMatrix As DigiPara.LDX.ILDXHideCS5 = ldxFactory.CreateMatrix(Nothing)
Dim ldxVector As DigiPara.LDX.ILDXHideVec5 = ldxFactory.CreateVector(Nothing)
' if the parameter of the Create... methods is set, the contents are cloned.
ldxMatrix.R.X = 100
Dim ldxMatrixClone = ldxFactory.CreateMatrix(ldxMatrix)
System.Diagnostics.Debug.Assert(ldxMatrixClone.R.X = 100)
ldxVector.X = 200
Dim ldxVectorClone = ldxFactory.CreateVector(ldxVector)
System.Diagnostics.Debug.Assert(ldxVectorClone.X = 200)
End Sub