Drawing Label Display

Drawing Label Display

Anonymous
Not applicable
577 Views
3 Replies
Message 1 of 4

Drawing Label Display

Anonymous
Not applicable

Inventor 2016

 

All updates and hot fixes installed

 

 

 

I have my drawing views set up to automatically include the description in the label (Fig 1 & 2).

This description pulls from the assembly model description which pulls from the part file description.

The description is based on an equation that pulls from the part model parameters so that it updates automatically if there is a change to the model (Fig 3)

 

As you can see in Fig 1, the fraction displayed are not stacked.  Is there a way i can make them stacked in the drawing and preserve my dynamic update chain?

0 Likes
578 Views
3 Replies
Replies (3)
Message 2 of 4

xiaodong_liang
Autodesk Support
Autodesk Support

Hi,

 

I might have not well understood your requirement because it looks this text is stacked already,i.e. ITEM7 is above description with a line between them.

 

anyway, with API, you can format the text with various stacking types by setting DimensionText.FormattedText.

 

formattedtext.png  

 

 

Note: I do not think this can apply to a text itself from iProperties as you defined. e.g. you defined <Description>as 

    =PL <P1> * <P2> * <P3>

 

while 'stack' tag would not work within this string. 

 

For more introduction, please check the API helpd document: XML Tags for FormattedText

 

api.png

 

 

 

 

0 Likes
Message 3 of 4

Anonymous
Not applicable

I wanted the fractions that were dynamically linked to the model to be stacked, i.e. in Fig 1 the text below ITEM 7 reads: PL, 1-1/2" x 8" x 12-1/8".  I was hoping there was a way to format the 1/2 and 1/8 so they were stacked, even though they are linked to the Description of the part.

0 Likes
Message 4 of 4

xiaodong_liang
Autodesk Support
Autodesk Support

Hi,

 

sorry, I do not see a way of API. and I also tried with the tag <stack> mentioned in the last message in [Description] Field, it is ignored in the final text. I think the field box of [Description] cannot even support a displaying of stacked string. 

 

One workaround I can think of is if you could filter out the numerator and denominator string out of [Description], you could use API to re-construct the text string of drawing with the tag <stack>. e.g. assume you get the a string from [Description], say :  MyTest 1/2 OK. then you filter out 1 is numerator, while 2 is denominator. then produce a formatted string of drawing text like:

 

DrawingText.FormattedText = MyTest <stack>1/2</stack> OK

 

 

0 Likes