We have a number of templates for common parts within our projects. We need to include the project no (4-6 digets) as a suffix for each file name.
example 100x10 FLT, 300Lg - 3841-5
My question is how is the best way to set the project no. as a paramater that i can call up in each part, assembly, drawing ect.
Do I link it through an exel spreed sheet, or do I creat a base part and link all other items to that part?
Or is there a better way.
Thanks
Vance
Solved! Go to Solution.
Solved by VdVeek. Go to Solution.
It's posible to use the Project name as a parameter. You can use this iLogic Rule manual or automaticly.
' Set a reference to the DesignProjectManager object. Dim oDesignProjectMgr As DesignProjectManager oDesignProjectMgr = ThisApplication.DesignProjectManager 'Set Project property to Active Project Name iProperties.Value("Project", "Project") = oDesignProjectMgr.ActiveDesignProject.Name
When you place this Rule as an Internal or an External iLogic rule in each Template file (Part/idw/assy) and add an 'New Document' Event Trigger to it. When you create a new document in your active project the Project Propertie is changed to the name of the active Project.
Rob.
Rob,
Thanks for that. I can get it to work I would like to manipulate the text to assign only the first 7 characters of our project name this is the code im using.
Our project name is "3841-5 - KNIFE GATE DESIGN" this is typical of our naming convention. I would like to assign "3841-5" only to the
iProperties.Value("Project", "Project")
The code below only returns the first character "3"
Any help would be greatly appreciated.
Regards
Vance
SyntaxEditor Code Snippet
' Set a reference to the DesignProjectManager object. Dim oDesignProjectMgr As DesignProjectManager oDesignProjectMgr = ThisApplication.DesignProjectManager oNAME = oDesignProjectMgr.ActiveDesignProject.Name MessageBox.Show(oNAME, "Title") oNAMEshort = (Left(oNAME(False),7)) MessageBox.Show(oNAMEshort, "Title") iProperties.Value("Project", "Project") = oNAMEshort
Change the Left command to:
oNAMEshort = (Left(oNAME,7))