Location of the arrow when using the Balloon snippet

Location of the arrow when using the Balloon snippet

jarle_oudalstoelEN4BR
Participant Participant
199 Views
2 Replies
Message 1 of 3

Location of the arrow when using the Balloon snippet

jarle_oudalstoelEN4BR
Participant
Participant

Hi. 

 

I am working on codes to place balloons on drawings and with the newly added snippet Balloon this is relatively easy.

The issue I am having is the placement of the arrow. As far as i can tell there is no option for the location of the arrow on the surface you are referring to with the GetIntent

 

Is there someone who can assist me in solving this issue. 

 

The code as I have it right now. 

oSP01 = oView.GetIntent(oPart5BN, "TS")
BLNUMBER = BLNUMBER + 1
oBalloon = HMTSheet.Balloons.Add(BLNAME & BLNUMBER, {oView.SheetPoint(1.0, 1.5) }, oSP01)

 Thank you all so much for your help. 

Jarle

0 Likes
Accepted solutions (1)
200 Views
2 Replies
Replies (2)
Message 2 of 3

WCrihfield
Mentor
Mentor
Accepted solution

It is difficult to determine where you would want it without seeing the drawing geometry where you want to place it, and a description of where along that geometry you would want to place it.  But I see that you are not specifying the last two input parameters that the 'GetIntent' method is asking for.  Just because those last two inputs are Optional, doesn't mean that you will never need to specify them, such as in this case.  They are used let us specify a more specific location along, or within, the specified piece of drawing geometry.

There are two versions of the 'GetIntent' method:

IManagedDrawingView.GetIntent Method (ComponentArgument, String, PointIntentEnum, CurveChoiceSpec) 

and

IManagedDrawingView.GetIntent Method (String, PointIntentEnum, CurveChoiceSpec) 

It looks like you are attempting to use the first one listed here.  So, the third input would can be a variation of the PointIntentEnum that is appropriate for this specific situation.  Then the fourth input would be what they are calling a 'CurveChoiceSpec' (unique to iLogic).  It is essentially a DocumentUnitsPoint2d object (also unique to iLogic).  You can create those using the IManagedDrawingView.SheetPoint method.  It will use that point by searching around that point for the most relevant place on the geometry to attach something to, such as your pointer.

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

Message 3 of 3

jarle_oudalstoelEN4BR
Participant
Participant

Thank you Wesley.

 

With your input I got this sorted. I was not aware of the two last input options in the GetIntent function. 

by adding "two words" at the end of my original GetIntent code I got it sorted. 

as you can see in the code below I added PointIntentEnum.kMidPointIntent which places the arrow at the midpoint of the surface START

 

	oSP01 = oView.GetIntent(oPart1BN, "START",PointIntentEnum.kMidPointIntent)
	BLNUMBER = BLNUMBER + 1
	Dim oBalloon = HMTSheet.Balloons.Add(BLNAME & BLNUMBER, {oView.SheetPoint(-0.2, 1.5) }, oSP01)

 

I am sure you know this, but for my fellow novis coders here is the list of "PointIntentEnum Enumerator" 

https://help.autodesk.com/view/INVNTOR/2022/ENU/?guid=PointIntentEnum