How do I add an external rule to an external rule. Or I have an external rule that exists and when I add to it I get errors. Both of these rules run fine alone. I want to add 2 lines of code to the end of an existing rule that all parts are already triggered to run at save.
see attached.
Solved! Go to Solution.
Solved by Radioflyer651. Go to Solution.
Solved by Radioflyer651. Go to Solution.
Hi Ray,
My guess is that, because you're using a "Sub Main", and an additional function, your additional lines of code must be in the "Sub Main" to execute.
When you're using functions and subs, all executable code must be in a sub or function.
Richard
Thanks I tried it below the sub & got errors- never thought of adding to above sub.
I serously need a course in the ILOGIC code!
Thanks Rich: I was wondering if you could help me with this string.
iProperties.Value("Project", "Designer")= Environment.UserName
this works alone but when I add it to the sub main I get the error "user name is not a member of inventor environment."
I am tring to capture the windows user name and slip it to the designer and author field on save. The Inventor (options) user name can be modified to easily.
Thanks for your time.
Oddly, mine worked when I added it to the Sub Main. There might be some other things going on, but try using:
iProperties.Value("Project", "Designer")= System.Environment.UserName
Richard