Hi!
All my files (iam and ipt) start with the project number I am designing them for.
Does anyone have an iLogic rule that could extract these first digits from the file name and automatically populate it to project number?
Thank you
Solved! Go to Solution.
Solved by johnsonshiue. Go to Solution.
Hi Daniel,
This one is easy. Even I can do it. Here you go!
Dim PN_Project As String PN_Project = iProperties.Value("Project", "Part Number") iProperties.Value("Project","Project")=Left(PN_Project,2)
Thanks John!
I will try to figure out now how to bring in the file name instead.
I use Vault with Auto-Naming, so my ipt files usually follow the patterns PPPP-NNNNN (in P the Project No and N the auto sequence created by Vault).
Our Part Number uses a macro to be populated, based on the element (plate thickness x width, or structural member spec for example).
Are there any courses to learn a bit more about iLogic and how to write the scripts?
For learning do an internet search using ilogic and the task you want to do and you will usually find this forum and post that might help you. There is also the ilogic help files
Here is the filename function found under document functions.
Dim fileNameWoExt As String = ThisDoc.FileName(False)
You can also sort of make out what each snippet does by navigating the ilogic browser looking in each category and adding the snippets of code and hover the cursor over the text to display a tool tip which is instructions on its function.
Can't find what you're looking for? Ask the community or share your knowledge.