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: 

iLogic: Save all to user specified location

2 REPLIES 2
Reply
Message 1 of 3
falkmassmann
476 Views, 2 Replies

iLogic: Save all to user specified location

Hello,

 

I´m trying to create an external iLogic rule that let´s the user specify a path and saves an assembly and all it´s components into one directory. Alternatively it could be the main workspace path which doesn´t have to be specified by the user so it can be handled internally.

The background is a design template that resides on a network storage which can be configured through an iLogic Form and when the user is done configuring the assembly to it´s liking it should be saved to it´s workspace.

 

I was looking through the snippets but couldn´t find anything related to "save all". I have the feeling that I have to cycle through all component occurences and save them one by one.

 

Getting a Save As dialog box seems to be possible as I could see on Curtis Waguespack´s blog but the commands he is using are nowhere documented. For example for calling the dialog box he is using

InventorVb.Application.CreateFileDialog(oFileDlg)
But in the API this is called with the command ThisApplication.CreateFileDialog(oFileDlg)
I sense this is code from Inventor API. I´m looking for these commands for a long time already but couldn´t figure out which syntax must be used to get functionality from the API. Are there any documents about this topic?
 
Would ThisApplication.CreateFileDialog(oFileDlg) work as well in iLogic, all this is very confusing without a proper documentation for iLogic.
 
Any help is much appreciated
 
Thanks for reading
 
Falk
 
 
2 REPLIES 2
Message 2 of 3

You may also consider the CommandManager functionality.

If you set FullFilename property in all documents then you could run the following iLogic code to execute Inventor’s “Save All” command.

 

Dim ctrl As ControlDefinition

ctrl = ThisApplication.CommandManager.ControlDefinitions("AppSaveAllCmd")

ctrl.Execute()

 

Here is the good post on the running Inventor commands using the API:

http://modthemachine.typepad.com/my_weblog/2009/03/running-commands-using-the-api.html

 


Vladimir Ananyev
Developer Technical Services
Autodesk Developer Network

Message 3 of 3

Thank you Vladimir,

 

this is very helpful information !! Smiley Happy

 

[Quote]

If you set FullFilename property in all documents then you could run the following iLogic code to execute Inventor’s “Save All” command.

[\Quote]

 

Could you ellaborate more on this part or where I can find more information about how to use FullFilename property?

 

Now I only have to find a way to set the save directory to WorkspacePath

 

All the best

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

Post to forums  

Autodesk Design & Make Report