partnumber at first at first time save ilogic

partnumber at first at first time save ilogic

Darkforce_the_ilogic_guy
Advisor Advisor
412 Views
4 Replies
Message 1 of 5

partnumber at first at first time save ilogic

Darkforce_the_ilogic_guy
Advisor
Advisor

I  want run an code that add custom properties if the part if it have the right partnummer or filename.. my problem is that it does not have a part nummer at the first time save... is the anyway to get it?

0 Likes
413 Views
4 Replies
Replies (4)
Message 2 of 5

JamieVJohnson2
Collaborator
Collaborator

you can use an input box, to have the user enter the part number, then put the value into your code, in addition, you could set the file's part number.

dim pn as string 

pn = inputbox("Enter a new part number for this file")

'do things with your pn.

Jamie Johnson : Owner / Sisu Lissom, LLC https://sisulissom.com/
0 Likes
Message 3 of 5

Darkforce_the_ilogic_guy
Advisor
Advisor
That Will not work for me Because the
r part nummer is generated by the vault and user in put.. I need the part Number from the vault.. Because I cant get it form the file jet
0 Likes
Message 4 of 5

philip1009
Advisor
Advisor

You can't access anything related to the vault program or vault add-in through iLogic, you'll have to use the vault to make sure everything is correct on the vault side when you do copy design or whatever before you open the files in Inventor.

0 Likes
Message 5 of 5

JamieVJohnson2
Collaborator
Collaborator

Are you using VaultProfessional?  If so there is a whole other API to communicate with vault server via the vault web service (I have experience with).  If VaultBasic, that API does not exist.  Inventor's Vault Add-in does not have an API at this time (that I am aware of), but we have been asking for some time to get one.

 

If you can communicate with vault via the API, then you could get your part number directly from vault, and go to town on it.  Vault also has copy design (old and new versions) that can offer 'rename file while copying' options as part of the program (basic and pro).  But the renaming process may not be complex enough for your strategy, hence the desire to write code.

Jamie Johnson : Owner / Sisu Lissom, LLC https://sisulissom.com/
0 Likes