Showing results for 
Search instead for 
Did you mean: 

Reading HoleData and their Properties/Parameters

Valued Contributor
Valued Contributor

Can anyone help me read the properties (or are they parameters) and their values for Holes (and other features) or that I can see the dependant data such as Depth or Counterbore sizes please?


This the sort of code I have been trying:-


objHole = objHoleDataCollection.Item(i)

objHoleData = objHoleDataCollection.Item(i)


' Prints GetHole(objHole) 'DEPTH

' Prints GetHoleData(objHoleData) 'CounterBore etc

Dim HProperties_info As PropertyInfo() = GetType(SolidEdgePart.HoleData).GetProperties()

Dim objHPropertySets As SolidEdgeFramework.PropertySets = Nothing ' SolidEdgePart.PropertyDefinitions = Nothing

Dim objHProperties As SolidEdgePart.PropertyDefinition = Nothing

Dim objHProperty As SolidEdgeFramework.Property = Nothing



Dim objHoles As SolidEdgePart.Holes = objDocument.Models.Item(1).Holes


Dim objAHole As SolidEdgePart.Hole = objHoles.Item(1)

'To get the related HoleData object

Dim objAHoleData As SolidEdgePart.HoleData = objAHole.HoleData


' Get an array containing the parameters (if any).

Dim params As ParameterInfo() = objAHoleData.GetIndexParameters()


Dim mi As MemberInfo


For Each mi In objAHoleData.GetMembers()


Dim parInfo As ParameterInfo


For Each parInfo In CType(mi, MethodInfo).GetParameters()

sValue = parInfo.ParameterType.FullName + parInfo.Name





Posted by: Ian Burrows
Post date: 5/1/2012 11:44:36 AM