Community
Inventor Forum
Welcome to Autodesk’s Inventor Forums. Share your knowledge, ask questions, and explore popular Inventor topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Increment custom iproperty value using ilogic

3 REPLIES 3
Reply
Message 1 of 4
Anonymous
844 Views, 3 Replies

Increment custom iproperty value using ilogic

Hello,

 

I would like to know the possibility of incrementing custom iproperty parameter value.

Let say, i had created custom iproperty by name "increment" and set the value to "01" initially.

Now, I have to write a ilogic code in such a way that, whenever if i make any parameter change/geometry change, custom iproperty have to increment the value like "01,02,03,04 and so on".

Please let me know how to do this.

3 REPLIES 3
Message 2 of 4
mcgyvr
in reply to: Anonymous

Caution.. I'm not good at this.. But it works.

 

INCREMENTCurrent = iProperties.Value("Custom", "INCREMENT")
INCREMENTNew = INCREMENTCurrent + 1
iProperties.Value("Custom", "INCREMENT") = INCREMENTNew

 



-------------------------------------------------------------------------------------------
Inventor 2023 - Dell Precision 5570

Did you find this reply helpful ? If so please use the Accept Solution button below.
Maybe buy me a beer through Venmo @mcgyvr1269
Message 3 of 4
Anonymous
in reply to: mcgyvr

Hello,

 

Thank you very much, the code is working fine.

Message 4 of 4
Anonymous
in reply to: mcgyvr

I found this really helpful for me, but the problem is that when I save .idw and open it again, all numbers change to the last value. Is there some solution which should I add to the current code?picture.PNG

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

Post to forums  

Autodesk Design & Make Report