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: 

Change Part File Name in Assembly using iLogic - Can it be done?

7 REPLIES 7
Reply
Message 1 of 8
munderwood4GRE6
458 Views, 7 Replies

Change Part File Name in Assembly using iLogic - Can it be done?

I'm trying to setup a rule that will check a newly inserted factory parts file name for a specified text parameter in the assembly.

 

Upon placing the part, it is already selected in the model tree by default but I'm not sure how to access the file name using iLogic.

 

Any help here is appreciated.

7 REPLIES 7
Message 2 of 8
A.Acheson
in reply to: munderwood4GRE6

Are you working with an iPart member?  If so how are you placing this through ilogic or manually? 

If placed manually the part isn't selected in my testing, you would need to find it through code or manually select it with code. . 

AAcheson_0-1639176447640.png

Can you supply more detail with any code you are working with. If I get your request you want to look for a text parameter in the part file selected? 

 

If this solved a problem, please click (accept) as solution.‌‌‌‌
Or if this helped you, please, click (like)‌‌
Regards
Alan
Message 3 of 8
munderwood4GRE6
in reply to: A.Acheson

I’m placing a factory asset into the assembly manually. Once I drop it in it’s automatically assigned a file name by factory that has the factory asset name followed by a bunch of random numbers and letters. The part is automatically selected after placing it. (It’s highlighted blue). I’m wanting to make a try catch loop triggered right after placing it that will add an identifier into the file name that inventor is generating automatically.
Message 4 of 8
A.Acheson
in reply to: munderwood4GRE6

I am not familiar with factory assets so not sure of their particulars. I would assume like most files it needs to be saved to disk first then you can select the part file and save and replace with new file name and delete the old. Can you share any code you have worked with before relating to these assets? 

Maybe other users can help out also. 

If this solved a problem, please click (accept) as solution.‌‌‌‌
Or if this helped you, please, click (like)‌‌
Regards
Alan
Message 5 of 8
TechInventor20
in reply to: A.Acheson

That's what I was thinking to. 

 

The other way is to make a copy of the file before you place it and change it to the filename you want and then place that file instead of the "Factory part".

Message 6 of 8

So the issue I have with these solutions is I'm trying to use this as a workaround for the way Inventor places Factory part files in Vault.

 

When you configure Vault and Factory together there  is a hardcoded folder generated in Vault titled Factory  Assets.

When using a Factory Layout (Factory Assembly) in Inventor you place factory Assets by selecting them from the asset browser. This browser is full of "published assets" which are nothing more than .ipt files that have been "published" to Factory library. They are converted into .faf files and contain some key information that Factory uses to include Factory Properties.

 

When you place a Factory Asset, it puts that .ipt into your assembly with the name of the asset followed by a series of letters and numbers to essentially make it unique. 

 

munderwood4GRE6_0-1639405023605.png

 

When you check the Assembly into Vault, this asset is saved in the Factory Assets folder in Vault. Any .ipt that is ever used through factory goes into this folder. If it is removed it loses it Factory functionality.  The problem is the folder becomes rather extensive quickly and I have no identifier for archiving old files. This is why I'm trying to figure out how to change the file name before they get checked into Vault. I still want the auto-generated file name but I just want to add the identifier in the front. This would give me the ability to know what I can remove from the Factory Assets folder in Vault.

 

Message 7 of 8
A.Acheson
in reply to: munderwood4GRE6

@CGBenner would you possibly know who on the autodesk team looks after factory asset work flow between vault and inventor? The above post would be outside of most people experience on this forum from what I am seeing it has rarely been mentioned. 

If this solved a problem, please click (accept) as solution.‌‌‌‌
Or if this helped you, please, click (like)‌‌
Regards
Alan
Message 8 of 8
CGBenner
in reply to: A.Acheson

@A.Acheson 

 

Between Vault and Factory,.... no.  I don't know of anyone specific.  I will tag @liqinomickey here to see if he may have some ideas.


Chris Benner
Industry Community Manager – Design & Manufacturing


If a response answers your question, please use  ACCEPT SOLUTION  to assist other users later.


Also be generous with Likes!  Thank you and enjoy!


Become an Autodesk Fusion Insider
Inventor/Beta Feedback Project

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

Post to forums  

Autodesk Design & Make Report