Applications Options - Content Center Library Path Setting (VBA)

Applications Options - Content Center Library Path Setting (VBA)

jtylerbc
Mentor Mentor
1,082 Views
4 Replies
Message 1 of 5

Applications Options - Content Center Library Path Setting (VBA)

jtylerbc
Mentor
Mentor

We are revamping some of our Inventor support file structure a bit, and I'm updating some of our VBA Macros to match.  We have a macro that is used at initial setup to aid in setting all the file paths in Application Options.  The changes I am making ultimately simplify it, but there is one thing I need to add that I can't seem to figure out how to do.  I'm not the writer of the original macro, and am a bit rusty on what little VBA I ever knew, so I'm finding myself a little stuck.

 

Is it possible to set the file path for Content Center Libraries (Application Options - Content Center tab) through the API?  It seems like that should be possible and I'm just overlooking it.

 

Currently using Inventor 2016, but will be upgrading to 2018 soon. 

0 Likes
Accepted solutions (1)
1,083 Views
4 Replies
Replies (4)
Message 2 of 5

smilinger
Advisor
Advisor

Use this:

 

Dim location As String = "G:\Inventor 2018 CC Libraries\"
ThisApplication.ContentCenterOptions.SetAccessOption(ContentCenterAccessOptionEnum.kInventorDesktopAccess, location)

 

0 Likes
Message 3 of 5

jtylerbc
Mentor
Mentor

Thanks, but it's not quite working.  I'm getting an error that says "Expected: =", on the second line of the code.

 

 

0 Likes
Message 4 of 5

smilinger
Advisor
Advisor
Accepted solution

Oh, that's for iLogic. For VBA you need this:

Dim location As String
location = "G:\Inventor 2018 CC Libraries\" ThisApplication.ContentCenterOptions.SetAccessOption ContentCenterAccessOptionEnum.kInventorDesktopAccess, location
Message 5 of 5

jtylerbc
Mentor
Mentor

Perfect, that does it.

 

Before I even posted the thread, I had figured out as far as ".ContentCenterOptions", but didn't know where to go from there and wasn't sure I was heading the right direction.  After your first post, I realized it was iLogic, and changed the way the path variable was defined appropriately.  However, I didn't realize that the second line also needed to change.  Looks like the parentheses from your iLogic version were the culprit when I brought it into VBA.

0 Likes