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: 

iLogic rule to insert part parameters into dimension text in assembly drawing

0 REPLIES 0
Reply
Message 1 of 1
DS-precast
569 Views, 0 Replies

iLogic rule to insert part parameters into dimension text in assembly drawing

I am trying to speed-up dimensioning of an assembly drawing (DWG) in Inventor using iLogic. The assembly contains parts which have parameters which I would like inserted into dimension text. I can achieve this manually using the Edit Dimension / Format Text dialogue boxes to select the part parameters and insert them into the assembly dimension text.

My iLogic rule can currently identify the part containing the parameters but when I attempt to write these to the dimension text, I receive an error message.


The part parameters are called “No_Risers” and “riser”. “partFileName” is the FullFileName of the Part Document containing these parameters.

 

 

 

Code Snippet

 

If oPart.ComponentDefinition.Material.Name = "Concrete" Then

partFileName = oPart.FullFileName

 

End If

 

oDimensionText.FormattedText = "<Parameter Resolved = 'True'

ComponentIdentifier='" & partFileName & "' Name = 'No_Risers'

Precision = '0'></Parameter>" & " No. RISERS @ " & "<Parameter Name

= 'riser' Precision = '2'></Parameter>" & " = " &

"<DimensionValue/>"

 

End of Code



The line which gives me the error message is the oDimensionText line :

 

(I have split the long line of code so it reads better on the forum. It is one line in the iLogic rule)

I have tried many variations of the above, but cannot get it to work. I can successfully write the parameter values to the dimension text, but these do not update if the parameters update.

I’m using Inventor 2013 Pro

Any help would be gratefully received.

0 REPLIES 0

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

Post to forums  

Autodesk Design & Make Report