iLogic to change Design State

iLogic to change Design State

Anonymous
Not applicable
2,651 Views
12 Replies
Message 1 of 13

iLogic to change Design State

Anonymous
Not applicable

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.

0 Likes
Accepted solutions (1)
2,652 Views
12 Replies
Replies (12)
Message 2 of 13

DeerSpotter
Collaborator
Collaborator

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.

Image and video hosting by TinyPic
..........................................................................................................................
Did you find this reply helpful ? If so please use the Accept as Solution or Kudos button below.
..........................................................................................................................


See My LinkedIn Profile
0 Likes
Message 3 of 13

Anonymous
Not applicable

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.

design state.jpg

 

0 Likes
Message 4 of 13

DeerSpotter
Collaborator
Collaborator

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. 

Image and video hosting by TinyPic
..........................................................................................................................
Did you find this reply helpful ? If so please use the Accept as Solution or Kudos button below.
..........................................................................................................................


See My LinkedIn Profile
0 Likes
Message 5 of 13

Anonymous
Not applicable
Yes that's right. I would like the rule to run on opening an inventor file so when checked in it would automatically be Pending otherwise I would be relying on the users to do so manually.
0 Likes
Message 6 of 13

Anonymous
Not applicable

So yes a local factor. Sorry wasn't very clear! 

0 Likes
Message 7 of 13

lesmfunk
Collaborator
Collaborator
Accepted solution

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.

Message 8 of 13

Anonymous
Not applicable

I didn't have the presence of mind to try something as simple as that! It does exactly what I need thanks.

0 Likes
Message 9 of 13

Anonymous
Not applicable

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.

0 Likes
Message 10 of 13

Anonymous
Not applicable

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.

 

 

 

 

0 Likes
Message 11 of 13

Anonymous
Not applicable

Thanks that works great!

I like simple. 

 

0 Likes
Message 12 of 13

Anonymous
Not applicable

 

 

0 Likes
Message 13 of 13

Anonymous
Not applicable

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.

0 Likes