Community
Inventor Forum
Welcome to Autodesk’s Inventor Forums. Share your knowledge, ask questions, and explore popular Inventor topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

iLogic to check Lifecycle State

7 REPLIES 7
Reply
Message 1 of 8
Garrett.SudickyADMIN
1319 Views, 7 Replies

iLogic to check Lifecycle State

Is there a way to use iLogic to get the lifecycle state of a file from Inventor?  I have an iLogic code that prints out PDFs of .idws but I want to check that the file is in the "Released" state before PDF'ing the .idw.  Nothing I've found online has been able to access the lifecycle states through iLogic.

 

Thanks for the help!

 

Mehran

7 REPLIES 7
Message 2 of 8

The "Design State" property in the Status tab of iProperties is a special case. 

 

Work_In_Progress = 1
Pending = 2
Released = 3


iProperties.Value("Status", "Design State") = Pending

 

You may try something like...

 

Dim oDesignState As Integer
oDesignState = iProperties.Value("Status", "Design State")
'Debug Box 'uncommen to check value
'MessageBox.Show(oDesignState, "Design State")


If oDesignState = 3
	'This code is a place holder for the PDF Publishing Code
	MessageBox.Show("I'm Printing a PDF", "Pretend Code")
Else
	'Check
	MessageBox.Show("Not Released - No PDF - sorry", "Not Released")
End If

 

Hope that helps!

 

Thanks,

 

 

 

 




Nathan Chandler
Principal Specialist
Message 3 of 8

Hi, thanks for the response.  The problem is I need to try to get the lifecycle states from Vault and that iProperty doesn't update along with the lifecycle state in Vault.  For example, when I change the lifecycle state on a test part in Vault from "Work in Progress" to "Released" the Design State property doesn't update.  Is there any way to get the correct lifecycle state through iLogic so I can check when I'm printing out the PDFs?

 

Thanks for the help,

 

Mehran

Message 4 of 8

There might be a default job processor job type for generate PDF.

You need to be in Vault Customization for this question. You can very easily trigger a process to run on a lifecycle transition in Vault. Linking it to an iProperty in inventor and running it that way is kind of convoluted.
Message 5 of 8

I don't want the PDF to printout on state transition.  The iLogic code I have runs a lot of exceptions for drawings the shop does need and doesn't need based off naming conventions/iProperties and the like.  Just mass printing PDFs would cause the engineer to have to look through and manually exclude drawings when the process is automated right now.  We are just trying to work in lifecycle states and this is another criteria we want to use in the PDF iLogic and I wanted to see if this was possible.  Since we are running the iLogic on Inventor models this seems like the appropriate place for this thread.

Message 6 of 8

You can build whatever logic you want into your custom job.  Just do it on the vault server where all the property information can be made available and the ready built lifecycle state triggers are there to start the process.

 

To my knowledge, there isn't any access to the vault lifecycles via ilogic and the design state property isn't meant to be updated when you change something in vault (as the vault lifecycle states are configurable and I don't think the design states in Inventor are.) You're kind of reinventing the wheel so that you can do it in ilogic when that might not be the right place to do this kind of thing.

Message 7 of 8

Everything I've found says to do the PDF conversion you have to go through Inventor.  I have looked into the job processor a bit and haven't found anything that allows you to convert the files to PDF unless I am missing something.

Message 8 of 8

Job processor uses Inventor Apprentice to generate DWFx files. This would be no different. You could write the job handler to exclude whatever things you want.

 

I'm just telling you this because I know the pain that comes from trying to take something further than it should be taken. Like using Excel or Access where you should be using a real database, trying to link ilogic to vault through some convoluted means will probably end up being more complicated and less effective while requiring more effort than learning how to make a custom job processor job that kicks off via a state transition, as is intended in the vault.

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

Post to forums  

Autodesk Design & Make Report