Hi there,
Does anyone have any sample code that will alter the Design State of a file? I would like to be able to set each file (on open or new) to Pending. Unfortunately I am fairly new to Inventor so my iLogic skills are zero.
We are using Inventor 2014 and Vault basic 2014.
Any help would be much appreciated.
Solved! Go to Solution.
Solved by lesmfunk. Go to Solution.
As you are new to ilogic, i'm new to design state. Can you explain a little bit more? maybe sketch a image in paint with x's (create a playbook) for us to understand.
I would like the attached property to change. I believe it would be known as the lifecycle of the file?
As we are only using Vault Basic I have very little control over this property but would like to make it work as part of a "revision control" system we are attempting to implement.
The file would remain as Pending while any work is being carried out. If a pre production version of it was transferred to the manufacturer it would move to Work in progress but moving straight back to Pending upon next check out. Once it has been signed off it would then become Released allowing us to trace the files which have been sent to the manufacturer and also allowing the Pending versions to be purged.
Hopefully this all makes sense.
So you want the actions of Vault to change those values?
Or do you want a local factor to change that?
Local Factor(S) - im thinking more or less like event triggers.
WorkInProgress = 1
Pending = 2
Released = 3
So, you can try adding this rule to force it to Pending:
iProperties.Value("Status", "Design State")=2
Then add it to an event trigger that works for you.
WARNING: Do not use "After Save Document" event trigger with Vault or the file will never check in.
I didn't have the presence of mind to try something as simple as that! It does exactly what I need thanks.
Hello just found this topic & it triiged a process I have been thinking of for a while. How could I use I logic to change the status to something other than "Work In Progress" "Pending" or "Approved" For instance "WIP" "APR" or "PND". This would solve an issure I have with many drawings that have limited room for status filed and my acronyms would work better for me.
In this case I would create a custom iproperty which would change to the desired abbreviation based on the actual design state of the item.
Set an event trigger that suits you, possibly iproperty change?
You can then use this custom property in your drawing border.
If iProperties.Value("Status", "Design State")=1 Then iProperties.Value("Custom", "design_state") = "WIP"
If iProperties.Value("Status", "Design State")=2 Then iProperties.Value("Custom", "design_state") = "PND"
If iProperties.Value("Status", "Design State")=3 Then iProperties.Value("Custom", "design_state") = "APR"
This is how a simpleton such as I would achieve it.
That works great thanks for the future! From Now on my parts will use this scheme to update the design state on all part & assembly drawings.
Looking in the past - Do you know a simple way to update status & set triggers on all my old parts? I thought I could use task scheduler to change the design state- when I tried this AM was not an option I could see.