AutoCAD Inventor :: Run VBA Macro When Save Is Pressed On IPT Files
Jan 27, 2011Is it possible to run a VBA macro every time the "Save" button is pressed on "IPT" files?
View 9 RepliesIs it possible to run a VBA macro every time the "Save" button is pressed on "IPT" files?
View 9 RepliesI have been using the addin "Save Run Macro" to automatically run a macro every time the "Save" button is pressed.
Any of the following questions about "Save Run Macro"?
1] When I protect the macro from viewing (so I can protect my code) "Save Run Macro" does not see the macro.
2] When I save the part for the first time (ipt, iam or idw/dwg) the macro does not run. I always need to run the macro again.
We want to change iassemblies in a table using macro. When we change an iassemblies, inventor asks "Do you want to save changes to ......?". There are many iassemblies in our model, so it takes serious amount of time. We can disable all messages using macro, But this time after macro completion, there may be some errors in model, because we dont accept all changes. How can we accept all changes while running macro?
We use SilentOperation property. but in Save dialog, there are some parts indicated "yes" and some indicated "no". how can we change them "yes" and save all dependents?
I have created an "addin" to monitor the "SAVE" & "NEW" button press on Inventor.What is the possibility of AutoDesk including this feature to the next release, or better still, creating a "patch" so that inventor can be upgraded to do it automatically, without the need to write an "addin"?
For Example,
If the user presses the "SAVE" button, AutoDesk Inventor would automatically look to see if a macro called "OnSave" exists. If it does, it "runs" the macro, if it does not exist, it works exactly as Inventor does now. This also would work in a similar way when pressing the "NEW" button.
I am trying to setup some rules to print various PDF files which we have managed to do without any problems.
The bit I am stuck on is when one of the PDF files being saved is open by another user.
We have been able to error trap it when it is open by showing a message box on error asking them to close the file befopre continuing. The current message box being used is the Retry / Cancel box.
When the user clicks Retry we would like it to re-run the rule, or loops through the rule and check is the file is still open. If the file is open return the same error, and if the file has been closed save the PDF file. When Cancel is pressed it ends the rule (This Bit has been done).
My questions is how do I get the rule to re-run / loop through when the retry button is pressed.
Is it also possible to show the user who has the file open (or Previewing it in a Window Explorer)?
I have attached the Code currently Being used but I can post it here of preferred?
How do I detect wich button the user pressed in the iLogic-form?
I can show it like this:
result=iLogicForm.ShowGlobal("MyForm", FormMode.Modal)
I guess that result is of type FormReturnValue - but I can't guess the qualifier (FormReturnValue.OK / FormReturnValue.OkBtn / ?)
Another iLogic question for you all.
I would like a simple rule adding to some standard pressed sheet metal parts that we have. The code would look at the current model tree and if any features are added to the part then a character (lets say a *) is placed into the "Vendor" field within the iProperties.
Is this possible?
Inventor 2010 Pro SP4, Vault Collaboration 2010
HP Z820 Xeon E5-2643 0 @ 3.3Ghz 16.0GB RAM
Nvidia Quadro 5000
I am working with an action macro to be able to use the EXPORT PDF option (save into current folder as DWG with no user input) / save the current drawing / and close.
At present i am able to get the macro to export the pdf and then (user input to directory to save and to overwrite the previous file) then save the file but cannot close the drawing.
In LT can you have a Macro or Lisp routine (thinking a bespoke button) that saves or shuts down a drawing and upon such, changes the current layer to 0?
View 2 Replies View RelatedI am using Autodesk Inventor 2013 for the first time. I've installed it but I have no template files when I want to start a new file. I think I may have set up th wrong file locations, "C:UsersPublic1DocumentsAutodeskInventor2013TemplatesStandards.idw was not found" it the message I keep getting.
Where and how should I setup my files, projects and meanings behind what they mean. I am completely lost I think it may be a good idea to start fresh.
I need to save an additional copy of a AutoCAD drawing whenever I press the save button.
Simply put, Every time I press save the autocad drawing is saved (Obviously!!!) but
I also need to save an exact copy of the drawing in a folder called (for eample only) "C:TestFolder"
I can do this using DxfOut for dxf files but I need to do this for dwg files.
Can it be done whenever I press the "save" button.
I am not seeing the "Save as to DWF" in my Inventor 2011 save as list.
View 4 Replies View RelatedI need to convert some of my ipt files to stp (around 130 files). Is there any way to do it all at once?
View 1 Replies View RelatedCan you save files for 2012 in 2013? I have the ability to upgrade to 2013 while others at my company are not able to, since they were not put on the subscription service. If I upgrade will they still be able to open my files or can I back save to a previous version? I know I can save it as different file type, like .iges or .step, then use feature recognition. But I need them to have full editability to sketches and features.
View 9 Replies View RelatedWe are using inventor 2014 LT in our work place and just recieved it. We are a production company that often makes many variations of a single part baised on the indivual job. I was wondering if there was a way to save one part file with multiple configurations so when you pull it into assembly file you select the configuration you want and then place it on the assembly.
View 6 Replies View RelatedI have created master assembly that has rules to 'save as' the assembly and parts to different locations and with different names. This master assy has links to excel file to get different names
In the same way I am looking the drawings (for both assy and parts) needs to be created and 'save as' to different locations. These newly generated drawings should have links to newly created parts/assembly.
I am able to 'save as' the master drawings to different locations but these newly created drawings still has links to master assembly/parts.
So I have 25 years 3d CAD experience. Catia, Alias, Ford PDGS.I have spent 20 hours on Inventor 2013. Great program. Very intuitive. Have been banging out models easily.
My issue however is a Client has given me sone .stp's and Iges files to work with.They open fine as a .iam The issue is saving. I have the project folder setup, go to save.
I Get the "do you want to save changes to "XXXXXXXX.iam" and all its dependants.I select "yes to all".I get the "Yes" under the "Save" Column for all listed .ipt's...I hit OK.......Autodesk attempts to save.
...Then I get the dialogue box up with ! icons "The system cannot find the path specified" - The database in C:Users.........xxxx.ipt could not be saved
I was able to use Inventor "Save Copy As" function to create zgl files. When the zgl files were viewed with "Imagination View" program, some files looked good, while some others do not show any geometry (just white background). Do I need to change anything in the Model before executing "Save Copy As" function?
View 3 Replies View RelatedSince we upgraded to Inventor 2012 SP1 on W7 x64 most machines cannot open or save out step or iges files. The translator shows as 'On demand' and when i save copy as the 'options' button is inactive. We just get the standard error 'Problems encountered while saving the document'.
I see lots of old posts but nothing relating specifically to stp files.
Inventor 2010
How do I record a series of actions that I can then save it as a kind of script or macro that I can run then in another work session on an object? Is this possible?
View 2 Replies View RelatedIs there a way to creat Macros in Inventor... like we used to do with AutoCAD?
View 5 Replies View RelatedWhen I am done with a drawing (inventor .dwg), I manually go to "Save Copy As" and select DXF, and using my default options, save the drawing as a DXF on a server (OUTSIDE of vault) that our shop guys can access for CNC stuff. I understand there is a DXF Translator that I may be able to set to do this for me. How to use Inventor add-ins (my translator is loaded, thats as far as I got) or set them as macros. A button on the ribbon to export to DXF would be nice and I may also want to automate this further and have it do it on file save.
View 9 Replies View RelatedI trying create simply macro for my work. It is mass rename for *.ipt files and their iProperty.And i need create condition "IF" for this (example 2 files):
4-1903-01 Pachole.ipt -> iProperties-Summary-Subject = nothing
4-1903-02-01 Dachole 2.ipt -> iProperties-Summary-Subject = "4-1903-02" (first 9 symbols)
How to do it? Maybe find first symbol "space"
Public Sub UpdateDocs()'JDK 2013' Include REF to Microsoft Scripting Runtime Dim oApp As Application Set oApp = ThisApplication Dim oDoc As PartDocument Dim oPropSet As PropertySet Dim FSO As New Scripting.FileSystemObject Dim oFld As Scripting.Folder Dim oFile As Scripting.File Dim Path As String Dim sTitle As String.
[code]....
How do you insert macros available in the user community in to the inventor. I tried to open default.ivb file and copied in it but it doesn't work. Any example which shows how to place macros in the inventor.
View 1 Replies View RelatedHow to call a addin from vba ? The addin is existing, source code not available :-(
My only idea is to somehow activate the button on the ribbon. Made a dump with the Print Ribbon routine from the online API help:
Tab: CDLIGHT, CDLIGHT.Part.Tab
Panel: iToolbox, CDLIGHT.iToolbox.Part.ToolBar
When you rename the layer and write the name of the letter "Б" is an error and automatically pressed "enter".When you click on a point in AutoCAD NumPad written comma.How can I avoid this problem?
View 1 Replies View RelatedI have one problem in this macro this macrofor drawing exporting to PDF.
How to save the pdf files in same location(Converting Drawing file location) and same number(Drawing file number).
Second one is in my inventor window I opened 20 files of drawings and how to set the macro for export to pdf all the 20 files in once.
Public Sub PublishPDF()
' Get the PDF translator Add-In.
Dim PDFAddIn As TranslatorAddIn
[Code]....
We just updated to 2013 this morning, and my macro isn't in the drop down (All Application Projects and Active Documents) menu like they were in 2012.
I haven't been able to find it when searching either. I created a test macro, and it showed up: C:Userscad1AppDataLocalTempUserProject1.ivb
But still is not in the dropdown in the macro menu. I'm using the same project that I had in 2012.Did installing 2013 remove/write over my maco? I imported my preferences this morning, they seem to be fine.
Can we Make code for Selecting Part Automatically?
View 9 Replies View RelatedIs it possible to Record Macro in Inventor 2014?
If yes, how can I acieve this?
If No, Is there any Add-in or other possibilities? Any Add-in available?
I have obtained a very useful macro from another discussion thread, [URL]....... It automatically names the frame members inserted by Frame Generator. I have modified the macro for our internal naming conventions, but the basic functionality is the same. I would like it to load automatically whenever I am in Inventor and believe an Add-In is the way to go. I have followed Brian Ekins "Taking the Step from VBA to Inventor Add-Ins" paper, but I think I am missing huge chunks on how Add-ins handle events and have been unsuccessful in finding any help topics. How to handle events in an add-in.
View 7 Replies View Related