Trigger iLogic rule based on the value of a custom iProperty

Trigger iLogic rule based on the value of a custom iProperty

cmcconnell
Collaborator Collaborator
650 Views
5 Replies
Message 1 of 6

Trigger iLogic rule based on the value of a custom iProperty

cmcconnell
Collaborator
Collaborator

So - I will start by saying I have very little programming experience. 😉

 

I am trying to create a rule in an .ipt that will automatically save out an igs file. My plan is to have a custom iproperty that I populate with the value of CNC.

 

I found the iLogic rule that ships with Inventor to save out an igs file. That part works, now I need to make it look at the iproperties to see if CNC is there in my process property.

 

Ideally, I would set this rule to run before save. When I hit save, it would check the process iproperty, if the property contains CNC, then it would save out the igs. if it does not contain CNC, the rule would end.

 

I have been looking through the group, but I have not found anything.

Mechanix Design Solutions inc.
0 Likes
Accepted solutions (1)
651 Views
5 Replies
Replies (5)
Message 2 of 6

bradeneuropeArthur
Mentor
Mentor
Tip.

Get more experience before running into problems in future....

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !


 


EESignature

0 Likes
Message 3 of 6

bradeneuropeArthur
Mentor
Mentor
This shouldn't be any problem with some experience and searching the web.

I will come back to it ASAP.

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !


 


EESignature

0 Likes
Message 4 of 6

cmcconnell
Collaborator
Collaborator

Thanks for the tip. I will be sure to reference it when you ask a question.

Mechanix Design Solutions inc.
0 Likes
Message 5 of 6

chandra.shekar.g
Autodesk Support
Autodesk Support
Accepted solution

@cmcconnell,

 

Try the following iLogic code to trigger IGS creation if "Process" iPropery contains "CNC"

 

Try 
	If iProperties.Value("Custom", "Process") = "CNC" Then
		iLogicVb.RunRule("Name of Rule to create IGS file")
	End If
Catch 
	MessageBox.Show("'" + "Process" + "'" + " iProperty does not exist", "iLogic")
End Try	

Triggering a iLogic rule before saving document is demonstrated in the below YouTube link.

 

https://www.youtube.com/watch?v=_hY2P93pr2Y

 

Please feel free to contact if there is any queries.

 

If solves problem, click on "Accept as solution" / give a "Kudo".

 

Thanks and regards,


CHANDRA SHEKAR G
Developer Advocate
Autodesk Developer Network



Message 6 of 6

cmcconnell
Collaborator
Collaborator

Thanks. Using your suggestion and some help from Kent Keller, I have managed to get it working.

Mechanix Design Solutions inc.
0 Likes