Attach leader to Surface Texture Symbol via API

Attach leader to Surface Texture Symbol via API

TA.Fehr
Advocate Advocate
632 Views
1 Reply
Message 1 of 2

Attach leader to Surface Texture Symbol via API

TA.Fehr
Advocate
Advocate

There are a number of posts about this like this one, this one, and this one, but unfortunately none of them deal with how to get the geometry intent of a surface texture symbol. I can have the symbol selected, but I can't figure out how to extract the GeometryIntent to which the leader can attach.

 

I've got my sketched symbol inserted and "oPoint", and surface texture symbol selected (obj). For all the other times I add a leader I just use the following snippet: 

Dim oGI As GeometryIntent
        Dim oCol As ObjectCollection
        oCol = _invApp.TransientObjects.CreateObjectCollection
        Dim refKey() As Byte = New Byte() {}
        Call oDrawDoc.ReferenceKeyManager.StringToKey(Values, refKey)
        Dim obj As Object = oDrawDoc.ReferenceKeyManager.BindKeyToObject(refKey)
        oGI = oSheet.CreateGeometryIntent(obj, oPoint)
        oCol.Add(oPoint)
        oCol.Add(oGI)

        Call oSketchedSymbol.Leader.AddLeader(oCol)
        oSketchedSymbol.LeaderVisible = False

But this fails on creating the leader.

I'm hiding the leader in the end so it doesn't matter really what exact point the leader is connecting to, but for the life of me I can't figure out how to get it to attach.

 

 

0 Likes
Accepted solutions (1)
633 Views
1 Reply
Reply (1)
Message 2 of 2

YuhanZhang
Autodesk
Autodesk
Accepted solution

Unfortunately currently we don't support to attach a leader to SurfaceTextureSymbol, please log a wish for this function enhancement on the IdeaStation, we will look into this then.



If this solves the problem please click ACCEPT SOLUTION so other people can find it easily.



Rocky Zhang
Inventor API PD
Manufacturing Solutions
Autodesk, Inc.