Showing results for 
Search instead for 
Did you mean: 

How to use GetRelated() ?

Valued Contributor
Valued Contributor


Edge programmers,

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)


  Call SE_Dim.GetRelatedCount(n)

  Debug.Print n


  If n > 0 Then

    Call SE_Dim.GetRelated(0, ObjRef, x, y, z, K_Point)

  End If

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,

The Netherlands.


Posted by: Willem van Burik
Post date: 9/11/2009 3:10:15 AM


RE: How to use GetRelated() ?

Valued Contributor
Valued Contributor

Hi Willem,


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 Kunert
Post date: 9/11/2009 4:25:14 AM