Reply

GetDimensions

[ Edited ]

Hi all,

 

I need a sample with de GetDimensions method...

 

Who can help me?

 

 

Posted by: Aldo Kruger
Post date: 11/14/2005 3:14:04 AM

2 REPLIES

RE: GetDimensions

[ Edited ]

Aldo,

 

There is probably a more elegant way to create an Array in VB.NET than what I used but this also works. You gotta remember, I'm a C# guy. You guys are killin me with the VB.NET syntax .

 

Let me know how it goes .

 

 

Imports System.Collections

Imports System.Runtime.InteropServices

 

Module Module1

 

Sub Main()

Dim objApp As SolidEdgeFramework.Application

Dim objDoc As SolidEdgePart.PartDocument

Dim objModel As SolidEdgePart.Model

Dim objExtrudedProtrusion As SolidEdgePart.ExtrudedProtrusion

Dim NumDimentsions As Integer

Dim Dimensions As Array = Array.CreateInstance(Type.GetType("System.Object"), 0)

 

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

objDoc = objApp.ActiveDocument

objModel = objDoc.Models.Item(1)

objExtrudedProtrusion = objModel.ExtrudedProtrusions.Item(1)

objExtrudedProtrusion.GetDimensions(NumDimentsions, Dimensions)

End Sub

 

End Module

 

 

Posted by: Jason Newell
Post date: 11/14/2005 5:27:57 AM

RE: GetDimensions

[ Edited ]

Hi Jason,

 

some VB.Net syntax

 

Shared Sub Main()

Dim objApp As SolidEdgeFramework.Application

Dim objDoc As SolidEdgePart.PartDocument

Dim objModel As SolidEdgePart.Model

Dim objExtrudedProtrusion As SolidEdgePart.ExtrudedProtrusion

Dim NumDimentsions As Integer

Dim Dimensions() As Object = New Object() {}

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

objDoc = objApp.ActiveDocument

objModel = objDoc.Models.Item(1)

objExtrudedProtrusion = objModel.ExtrudedProtrusions.Item(1)

objExtrudedProtrusion.GetDimensions(NumDimentsions, Dimensions)

'MessageBox.Show(Dimensions(0).Value)

End Sub

 

 

Cheers

Calum

 

Posted by: Calum McLellan
Post date: 11/15/2005 12:33:35 AM