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: 

iProperties in sketch

5 REPLIES 5
Reply
Message 1 of 6
PolemEngineering
580 Views, 5 Replies

iProperties in sketch

As far as I know, Autodesk still doesn't give the option to use iProperties in part-sketches. Only parameters can be selected.

There are a few parts I which want to provide with text. These parts are kind of template-parts with only text changes.

Is there a workaround for this. Maybe with the API (I'm working on my VBA skills).

Thanks in advance,
René
5 REPLIES 5
Message 2 of 6

René,
Does this work for you?
ThisDocument.ComponentDefinition.Sketches(1).TextBoxes(1).Text _
= ThisDocument.PropertySets("Inventor User Defined Properties").Item("txt").Value
where txt is a Custom property of type text.

- Sanjay Kulkarni

Message 3 of 6

Sanjay,

Yes, this works for me...

If I want more textboxes I increase the numbers. I only have to consider with the order of textboxes (I asume there is no way to check the order).
Thank you very much.

Greetz,
René
Message 4 of 6

René,
You don't need to remember the number as long as you know some property of that object that is unique. (The text in the textbox in this case). So, something like this should work:

For Each tBox in tBoxes
if tBox.Text = "txt" then ' unique value
'change value
Exit For
Endif
Next

This is a very standard technique universally used.

Sanjay Kulkarni
Message 5 of 6

Great,
thank you very much,
René Edited by: PolemEngineering on May 18, 2010 5:16 AM
Message 6 of 6
Anonymous
in reply to: sanganaksakha

Hi,

I would just like to thank you for the solution, it's precisely what I was asked this afternoon 🙂

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

Post to forums  

Technology Administrators


Autodesk Design & Make Report