Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
jtylerbc
944 Views, 4 Replies

Applications Options - Content Center Library Path Setting (VBA)

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. 

smilinger
in reply to: jtylerbc

Use this:

 

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

 

jtylerbc
in reply to: smilinger

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

 

 

smilinger
in reply to: jtylerbc

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
jtylerbc
in reply to: smilinger

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.