04-12-2022
12:23 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
04-12-2022
12:23 PM
Just a quick point of clarification
This iLogic function checks for the iproperty and creates and sets it if does not exist. It does all of that in this one line.
iProperties.Value("Custom", "Foo") = "hello world"
If we are getting the iproperty value using the same iLogic function, then we will get an error if it does not exist, and so it's best to wrap this in a try/catch.
Try oFoo = iProperties.Value("Custom", "Foo") Catch End Try
This can be written as one line also:
Try : oFoo = iProperties.Value("Custom", "Foo") : Catch : End Try
or as such:
Try : oFoo = iProperties.Value("Custom", "Foo") : Catch : MsgBox("iprop not found") : End Try
I hope this helps.
Best of luck to you in all of your Inventor pursuits,
Curtis
http://inventortrenches.blogspot.com