Reply

Read ddimensions from part

[ Edited ]

 

Hi,I trying to read dimension from part using GetDimesion. But obviously I make some mystique when I use GetDimension.Here is code from VB6. Part is made in SE20. Can’ someone give me sample code or solution how to read dimension of part through VB6 code ?

Thanks in advance.

Marijan Glavac

 

 Private Sub Form_Load()  Dim objApp As Object Dim objFeatures As Object Dim objFeature As Object Dim NumDimensions  As Integer Dim Dimensions()  As Object Dim i As Integer 'Connect to a running instance of Solid Edge. Set objApp = GetObject(, "SolidEdge.Application")  'Access the Features collection. Set objFeatures = objApp.ActiveDocument.Models(1).Features  'Iterate through all the features in the collection.  For Each objFeature In objFeatures    i = i + 1    'Turn on the dimension display.   objFeature.ShowDimensions = True   Debug.Print "Feature :"; i'    Debug.Print "       Application"; objFeature.Application'    Debug.Print "       AttributeSets"; objFeature.AttributeSets    Debug.Print "       DisplayName: "; objFeature.DisplayName   Debug.Print "       Name: "; objFeature.Name   Debug.Print "       EdgebarName: "; objFeature.EdgebarName   Debug.Print "        Status: "; objFeature.Status   Debug.Print "        SystemName: "; objFeature.SystemName   Debug.Print "        Type "; objFeature.Type   Call objFeature.GetDimensions(NumDimensions, Dimensions())   Debug.Print "        NumDimensions: "; Dimensions(0).Value     Next            

 

Posted by: marijan glavac
Post date: 4/19/2009 9:55:25 PM