VB create part in RS ( VSTA)

Hi

I have a problem with this tow line.
matrix_origo = New Matrix4(New Vector3(0, 0, 0))

b1 = Body.CreateSolidBox(matrix_origo, size)

VB code


Public Sub Macro_CreateSolidBox()

Dim stn As Station

Dim pt As Part

Dim matrix_origo As Matrix4

Dim b1 As Body

Dim size As Vector3

Dim x As Double

’ TODO: Define actions to perform when the Macro is invoked.

Logger.AddMessage(New LogMessage("log: " & “Create solid box”))

'get the station object

stn = Project.ActiveProject

'Create a part to contain the solid body

pt = New Part()

pt.Name = “OurPart”

stn.GraphicComponents.Add(pt)

'Create a solid box.

x = 0

matrix_origo = New Matrix4(New Vector3(0, 0, 0))

size = New Vector3(0.3, 0.4, 0.5)

b1 = Body.CreateSolidBox(matrix_origo, size)

b1.Name = “OurBox”

pt.Bodies.Add(b1)

End Sub


Hi
Found it:

size = New Vector3(0, 0, 0)

matrix_origo = New Matrix4(size)