Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Adding Text to Inventor Dimension with iLogic or VBA

22 REPLIES 22
SOLVED
Reply
Message 1 of 23
ccoomes
7411 Views, 22 Replies

Adding Text to Inventor Dimension with iLogic or VBA

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..

22 REPLIES 22
Message 21 of 23
GeorgeWilliams
in reply to: DS-precast

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"
************************************************************************************
Message 22 of 23
DS-precast
in reply to: GeorgeWilliams

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.

Message 23 of 23
jckcad
in reply to: ccoomes

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

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report