Adding Text to Inventor Dimension with iLogic or VBA

Adding Text to Inventor Dimension with iLogic or VBA

ccoomes
Advocate Advocate
8,675 Views
23 Replies
Message 1 of 24

Adding Text to Inventor Dimension with iLogic or VBA

ccoomes
Advocate
Advocate

Does anyone know how to add pre-defined text to a Selected Dimension with either iLogic or VBA?

 

I have to create lots of drawing with a lot of dimensions with the same wording.

 

The Layout is as follows:

 

<DIM> Maximum

Product Width

 

What I would like to do is select the Dimension, and then click and button on a form (or VBA USerform) that adds pre-defined text.

 

Has anyone been able to do this as it will make my life a lot simpler..

Accepted solutions (1)
8,676 Views
23 Replies
Replies (23)
Message 21 of 24

GeorgeWilliams
Advocate
Advocate

Did you find an answer to your question?  I am needing the same functionality.

 

After manually setting the dimension text with a parameter reference I inspected the formatted text on the dimension object to be ...

 

"<DimensionValue/><Parameter Resolved='True' ComponentIdentifier='ValidPathToMyPart' Name='Dim_A' Precision='2'>53.75</Parameter>"

 

If I then set the formatted text value with that same string, I get an "automation error, Unspecified error".  Maybe that isn't supported via the API?

George Williams
D3 Technologies - Automation Solutions
************************************************************************************
If this post helps, please click the "thumbs up" to give kudos
If this post answers your question, please click "Accept as Solution"
************************************************************************************
0 Likes
Message 22 of 24

Anonymous
Not applicable

George

 

I never managed to find a solution to this issue.

 

I also tried the method you have described, with the same results.

 

I have concluded that it is probably not possible to do this with the API; or if it is possible, I still don't know how to do it.

 

Thanks for your reply.

0 Likes
Message 23 of 24

Anonymous
Not applicable

Does anyone know the "<  />" code for GAUGE as a dimension text user parameter?

 

I see that "<DimensionValue/>" is for the dimension value, "<br/>" does a return to next line, <stack> does a stacked dimension, etc.

 

Thanks,

 

JCKCAD

0 Likes
Message 24 of 24

r_pruellage
Contributor
Contributor

Hello, i have found your solution with the adding text to dimension.

Is there a solution so add parameter to a dimension? The parameter is just added to a dimension. Example please see below.

In green my text added by hand

4 is a parameter

345 is a parameter

1380 is a catched dimension a shape of the geometri of the ipt and in best case it should look like below.

Is that possible? I dont neet to select dimension because the place is always the same with the added parameters.

r_pruellage_1-1718129123629.png

 

 

0 Likes