Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

iLogic to change Design State

12 REPLIES 12
SOLVED
Reply
Message 1 of 13
cadmanagershat
2238 Views, 12 Replies

iLogic to change Design State

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.

12 REPLIES 12
Message 2 of 13

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
Message 3 of 13

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

 

Message 4 of 13

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
Message 5 of 13

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.
Message 6 of 13

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

Message 7 of 13
lesmfunk
in reply to: cadmanagershat

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
cadmanagershat
in reply to: lesmfunk

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

Message 9 of 13
Ray_P
in reply to: cadmanagershat

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.

Message 10 of 13
cadmanagershat
in reply to: Ray_P

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.

 

 

 

 

Message 11 of 13
Ray_P
in reply to: cadmanagershat

Thanks that works great!

I like simple. 

 

Message 12 of 13
Ray_P
in reply to: cadmanagershat

 

 

Message 13 of 13
Ray_P
in reply to: cadmanagershat

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.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report