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: 

How to add Project properties inside the drawings as smart text

5 REPLIES 5
SOLVED
Reply
Message 1 of 6
federico_dellaboscaCRC5H
231 Views, 5 Replies

How to add Project properties inside the drawings as smart text

Hi everybody,

I need to put the Project Name inside the drawings. I want it to be automatic (smart text). I now that there is the iProperties <PROJECT> but it require to write manually inside each part properties the field <PROJECT>. Moreover, if I copy and paste this part inside another project folder, I would like to have the field updated inside the drawing. That's why I think that would be better to write something inside the Project settings (see photo) and then retreive it inside the drawing. However, I can't find any Project related iProperties (I searched for "proprietario" that in english stands for "owner" without success). Could anyone help me?

PS. Sorry for my flawed english, I hope that everything is clear.

5 REPLIES 5
Message 2 of 6

FYI, I've used Inventor for close to 20 years now, and I've never seen anyone use that "Owner" property for anything.

 

What I did was write a relatively simple iLogic rule that looks at the file name of the active Project File and copies that to the existing "Project" iProperty in the drawing that you mentioned.  In my case, I set an Event Trigger for this rule as "New Document".  This means the rule would only trigger when the document is first saved.  I had reasons for doing that in my application, but you may want to use "Before Save" instead, so it will update every time the drawing is saved if the project file name changes.

 

 

Dim IPJ as String
Dim IPJ_Name As String
Dim IPJ_Path As String
Dim FNamePos As Long
'set a reference to the FileLocations object. 
IPJ = ThisApplication.FileLocations.FileLocationsFile
'get the location of the last backslash seperator 
FNamePos = InStrRev(IPJ, "\", -1)     
'get the project file name with the file extension
IPJ_Name = Right(IPJ, Len(IPJ) - FNamePos) 
'get the project name (without extension)
IPJ_ShortName = Left(IPJ_Name, Len(IPJ_Name) - 4)
'get the path of the folder containing the project file
IPJ_Folder_Location = Left(IPJ, Len(IPJ) - Len(IPJ_Name))

'Converts the project file name to UPPER CASE
IPJ_Shortname = UCase(IPJ_Shortname)

iProperties.Value("Project", "Project") = IPJ_Shortname

iLogicVb.UpdateWhenDone = True

 

 

I'm not sure why lines 13 and 14 are there.  They are determining the folder location where the project file is stored, but then nothing is done with that information as far as I can tell.  It's possible that they are leftovers of an older version of the rule.  They could probably just be deleted, but I didn't have time to test that and troubleshoot it before posting this example for you, so I left it as-is.

Message 3 of 6

You can mass fill the project field by opening the top level assembly > Bill of Materials > Add Column > Choose project and place where you want it to go. Now, fill in a cell and either drag down, or shift/select then copy and paste to all the cells. This will populate the project. But, if you ever use these parts again in a different project and you change it, then it will screw up that field for all other previous jobs. Instead what if you used the drawing Iproperties project field? You can fill it out in 1 drawing and then at the end when all others are placed in, you can use the design assistant and copy and paste that field in all other drawings. If you use vault, then you can obviously mass fill out that field there as well. Just some thoughts.

Autodesk Certified Professional
Message 4 of 6

Thank you very much, It worked well. I had to study this solution because I've never used iLogic before.

Message 5 of 6

Maybe an excel file inside a folder with common fields like PROJECTNUMBER, PROJECTMANAGER, PROJECT, CLIENT, could serve as a source for all ipt's & dwg's inside that folder? Because with Vault, you only have 1 projectfile (ipj)

Inventor 2025, Vault Professional 2025, Autocad Plant 3D 2025
Message 6 of 6

It would be interesting to have an excel file with all Project info but then how can you access those information and use them inside the drawings? (P.S. I don't have Vault)

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

Post to forums  

Autodesk Design & Make Report