AutoCAD Inventor :: Macro For Printing And PDFing Simultaneously
Feb 16, 2012
I was wondering if there is a macro for printing and PDFing a drawing simulataneously so I don't have to essentially print the same drawing twice. I have done a little research thus far and have turned up nothing. They don't have to necessarily print and pdf at the same time, rather have one print and then the other PDF (or vice versa) once completed?
I have an assembly with multible parts which all have iLogic rules in them. I want to controle when the rules are executed in each part, thus I have set them as "Don't run automatically". These rules are iTriggered by the top assembly, if they are active.
Is there a possibility of how I can run multiple rules simultaneously?
The code below is an example of the controle rule that determines the rules to be run but it takes one rule at the time...
IfComponent.IsActive("5580 Heating element package 1")=TrueThen iLogicVb.RunRule("5580 Heating element basket 1", "iTriggerRule") EndIf IfComponent.IsActive("5580 Heating element package 2")=TrueThen iLogicVb.RunRule("5580 Heating element basket 2", "iTriggerRule") EndIf . . . up to x
I have also tried with For - Next statements...But the rules are run in the order that tey are written...
As the computer has a lot of memory in reserve; I want somehow all the iTriggerRules to be run at the same time as this would save a lot of time.
Is there any way to change the colour of all faces in a select set simultaneously?
The method I am referring to is when you select faces in a part document, rickt click and select properties from the context menu, a dialog box pops up called "Face Properties" which prompts you to select a colour and click OK. when this is done all of the faces are changed at once.
How do I replicate this via the API?
Currently I have it iterate through each face in a part document and apply the colour override one by one which can take a while when there are about 1000 faces. You can see each face changing as you go.
My CorelMacros.CreateColorSwatch macro has stopped dumping the swatches into whatever blank Letter-sized document I have open (which is how it used to work) and instead it is creating a new document, at 4.25" wide x 7" high, and dumping the swatches into that. Using Pantone Solid Coated, but it's doing this regardless of what palette I choose.
There is no option in the Macro's dialog box to alter or even instantiate a page size, and I cannot find in the code of the macro where to set this variable.
When 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.
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 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):
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.
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.
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.
I added two macros to be run from a button in the ribbon. The first time I run one of these macros after startup of Inventor, it takes a lot of time to run (approx. 5 sec.). But the second and subsequent time the tools are ran, the process is pretty much instantaneous. It's like the VBAeditor has to load on the background before the tool can process.
I arrived a this hypothesis because the VBA editor is taking around 5-10 seconds to load for the first time but after the tool (macro) has ran once, the VBA editor can be opened instantaneously.
Malfunctioning Title Block Macro in Inventor 2014? The script is attached. I think there is a problem with datums. I have switched to a new computer and installed Inventor 2014 on it. The macro worked with my old computer and Inventor 2013. This is a .ivb-file, not a .txt-file. Please change that before you test it.
I have made a macro that asks for a location on the file server (=client name) and then the project name. It then automatic creates the correct folders, opens my custom assembly template and changes an ipart that is by default in it.
That's all great and can save us a ton of time, but the last step is to automatic save the assembly! I just can't get it working and can't find the correct code.
I have defined the target folder earlier and the file name of the assembly is identical to this folder. For example
the code that I think should work looks like this:
Sub SaveAssembly() Dim oAssDoc As AssemblyDocument Set oAssDoc = ThisApplication.ActiveDocument oAssDoc.SaveAs ("O:ProjectsclientNameClientProject1ClientProject1.iam", False)End Sub
But it doesn't work, I always get the error message "Compile error: Expected: =" Whatever I do next I don't get the code to work
Looking for example macro that can create a new sketch, add a few lines and arcs, Then revolve the sketch around an axis to create a solid part. For example a shaft?
I use this macro to toggle my browser from Model to Vault, and have since IV2009, and I have always used a shortcut key combination to access it. Now that I have installed 2012, the keyboard shortcut doesn't stick. Every time I close Inventor and re-open it, I have to reassign the key combination to this macro. This equals annoying! Maybe I didn't properly implement the macro in VB?
My system is setup to use different projects and vaults depending on which department one is working. I have been jumping back and forth and was trying to find a macro to quickly switch projects, log out of the current vault, and log back into a different vault. I have minimal experience with macros and none with macros in Inventor . I am using Inventor 2009.
I created a macro for generate a PDF drawing, but when one file has been already created, AND he's already open, the macro don't work.
How to stop the macro automatically and notify that the macro has been stopped because the file is open.
Below, the current macro :
Sub PublishPDF()'Get the PDF translator Add-In.Dim PDFAddin As TranslatorAddInSet PDFAddin = ThisApplication.ApplicationAddIns.ItemById("{0AC6FD96-2F4D-42CE-8BE0-8AEA580399E4}")'Set a reference to the active document (the document to be published).Dim oDocument As DocumentSet oDocument = ThisApplication.ActiveDocumentDim oContext As TranslationContextSet oContext = ThisApplication.TransientObjects.CreateTranslationContextoContext.Type = kFileBrowseIOMechanism [Code] ....
I have been working with macros basically making user forms to control the models. The program calls on a part that I use as an actuation template (its just a part with parameters that are then linked to the assembly contraints) then the macro will change the parameters and update the model.
What I need to do is to put in some code in the userforn initialize sub that gets the actuation template from the disk, for example: C:Other StuffActuation Template A.ipt. Then the macro places the part into the assembly. The userform then manipulates the actuation template (and the assembly model). Then when the userform is unloaded the part is deleted from the assembly.
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 have keyboard commands set up for exporting my .idw drawings to .pdf format (PD for me.) I would also like to set this up for exporting my drawing to .dxf format. I think this can be done with a macro that can be activated by a keyboard command, but I could be wrong. I don't want to do this with an iLogic.