Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Application Options editing from API code?

1 REPLY 1
SOLVED
Reply
Message 1 of 2
Anonymous
1014 Views, 1 Reply

Application Options editing from API code?

I'm looking at a way to edit the Application Options tab when a particular file is opened. For example, by loading file "template" it would set constraint options to a standard, set the background color of the application, etc. giving me a songle file to load my preferred settings.

 

For a first run example, could someone help me with code such that when I open the file and run the rule, it would change the username from User to NWilson?

 

I'm very weak with the API code tools and structure, and I have zero VB experience. My train of thought is as follows:

 

Dim x = ThisApplication.GeneralOptions.UserName

If x = User

Then ThisApplication.GeneralOptions.UserName=NWilson

 

Obviously, I don't know this language yet, so you're helping me learn syntax as well as solve this particular problem. A link to any resources on this language would be doubly appreciated.

 

Thanks.

1 REPLY 1
Message 2 of 2
jdkriek
in reply to: Anonymous

You have it

 

If ThisApplication.GeneralOptions.UserName = "KRIEKJ" Then
	ThisApplication.GeneralOptions.UserName = "JDK"
End If

 

As for the API  - I suggest you look through VBA and then iLogic is basically VB.NET 😉

Jonathan D. Kriek
MFG Solutions Engineer
KETIV Technologies, Inc.


Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report