Project file template directory not being read by ilogic rule

Project file template directory not being read by ilogic rule

tmathieson
Advocate Advocate
362 Views
2 Replies
Message 1 of 3

Project file template directory not being read by ilogic rule

tmathieson
Advocate
Advocate

Hello to All,

 

i am having an issue with  the template directory being read by an ilogic rule.  we have set up a project that points the template directory to the server folder on the server.  in Inventor, if I create a "create new drawing" icon, the proper directory is shown, and i see all the options for different drawing templates.  however, when i run the rule, it looks for my files in the standard "C:\Users\Public\Documents\Autodesk\Inventor 2023\Templates\en-US\" directory...

 I use these line of code to get the template directory, but instead of returning the server directory I am looking for, and set in the Project file, it returns the directory above

strLocation = ThisApplication.FileOptions.TemplatesPath
Logger.Debug(strLocation)

 short of hard coding the server directory in to the rule,  or changing the defaults in application options, there a way to force Inventor/ilogic to see the template directory in the project file, instead of the 'standard' shown under file options

 

thanks for any and all suggestions!

0 Likes
Accepted solutions (1)
363 Views
2 Replies
Replies (2)
Message 2 of 3

Michael.Navara
Advisor
Advisor
Accepted solution

If you want to get templates path of active project, you need to use different property

Dim defaultTemplates = ThisApplication.FileOptions.TemplatesPath
Dim projectTemplates = ThisApplication.DesignProjectManager.ActiveDesignProject.TemplatesPath

Logger.Info("defaultTemplates: {0}", defaultTemplates)
Logger.Info("projectTemplates: {0}", projectTemplates)
Message 3 of 3

tmathieson
Advocate
Advocate

thank you @Michael.Navara !! fixed me right up

0 Likes