I'm trying to get the occurence-names to which a PMI-dimension is attached to, using the folowing :
Dim ObjRef As Object
Dim K_Point As Boolean
Dim x, y, z As Double
Dim SE_Dim As SolidEdgeFrameworkSupport.Dimension
Dim n As Long
Set SE_Dim = AssemblyFile.PMI.Dimensions(1)
If n > 0 Then
Call SE_Dim.GetRelated(0, ObjRef, x, y, z, K_Point)
At de GetRelated-method I'm getting a 'Type mismatch' error. The GetRelatedCount-method works OK. I'm getting a value of '2' into n.
Changing the first parameter (index) to '1' doesn't work either.
What am I doing wrong...
Willem van Burik,
Posted by: Willem van BurikPost date: 9/11/2009 3:10:15 AM
i could't try myself, but please try to instanciate ObjRef first by declaring it as "Dim ObjRef as Object = New Object". Because out-parameters usually need to be fully initialized. I hope this helps.
Posted by: Wolfgang KunertPost date: 9/11/2009 4:25:14 AM