AutoCAD Inventor :: Using Ilogic Or Macro To Automate Drawing Creation Of IAssembly Members
Nov 6, 2012
I have an iassembly which contains around 500 different members. There aren't any major differences between the members other than parts being Included/Excluded and parts being replaced by similar parts (this can all be done in the table as the parts are all created as one ipart family).
I need an assembly drawing for every member. As the drawings will be very similar, it is possible to just create one drawings then use 'Save as' and 'replace model reference' to create the whole lot. As this process would be very tedious and time consuming, I want to create a ilogic program or a VB macro to automate this process.
Basically i need a program that will...
FOR every line in the table (say 1 to 500)...
look at the currently active drawing...
replace model reference (for 2 views and a parts list) with the appropriate member (whos file name will match it's Part Number)...
save as with a file name that matches the current rows Part Number...
All I want to do is automatically generate a drawing for an assembly with sheets for the component parts. The assembly is being placed as an iLogic part if that makes a difference.
Inventor does not think an update is required for iAssembly members after changes to attributes on a client feature are saved. In our workflow we avoid rebuild all because it causes subassemblies to change, so we force an update by changing a parameter. Through the API is there a good way to indicate that our change was significant enough for members to need updating?
Is it possible to automate the creation of a DXF file when you save or check-in a part file from inventor. I have already set it up to create a DWF file to a shared folder on our network but we also export to DXF files as well for use in our machine shop. As of now the only way I know of doing it, is to open the .idw file and save it as a DXF manually. How to set this up to automatically create one on save or check-in.
Issue between an i-assembly and i-Logic. So, I have an assembly that includes some extra components that are not always needed and therefore an i-Logic rule takes the decision whether these will be suppressed or not.
Of course this is not a problem however it turns out that I miss some info from BOM according to the suppressed parts ...and all these makes sense following the LOD etc.
A potential solution to keep up to date the BOM while you are excluding the needless components is to create an i-Assembly.
To keep that simple I turned my current Assembly to an i-Assembly and very successfully I excluded various components and of course I included some others by adding extra ROWS.
So far So good
Now I want to apply some dimensional boundaries by using i-Logic rules. According to them I want to allow this i-assembly to jump among these different ROWS that meet the right criteria.
Very rough thoughts led me to the following code...
For example...
If Width > 600 Then iPart.ChangeROW ("..." , "...") 'Row-1' Else iPart.ChangeROW ("..." , "...") 'Row-2' End if
The Problem is that the above code works fine, for a example, in case that I will place an i-part in my assembly... However I am looking to change the row of the actual assembly that as I mentioned before I turned it to an i-assembly
To make this even more clear I want to be able to manipulate my i-assembly with i-Logic rules while this is open in Inv. I don't want to change rows while this is placed as a component or sub-assembly in an another assembly...
I have created two iParts, both with corresponding tables which I then put into an iAssembly so I can change the size of a pad eye and two cheek plates depending upon the desired Working Load Limit. I have a very basic form right now with a drop down menu to chose the different Safe Working Loads but whichever one I choose, is not changing the table configuration to the desired size. Clearly my iLogic code is not working the way I would like. See below and also see attached screen shots so you know what I am working with.
This code was actually overwriting the table properties (in excel), so I know this is wrong, I just couldn't find any snippet for changing a table configuration .
I have created two table rows in an iAssembly that I would like to have a iLogic code written for.
What do I need to use to trigger between these two, when, for instance, a certain numeric value is entered in the parameters? Within the assembly file, when I use the iPart.ChangeRow (or iAssembly.ChangeRow) and put the . I am filename in the first spot, it says it cannot find the file.
This is what I am using, and the error states it cannot find the . i am file I am referencing.
I have the following code to automate the insertion of several files iLogic.
Sub TestPlace(doc As String) Dim cm As CommandManager Set cm = ThisApplication.CommandManager Call cm.PostPrivateEvent(kFileNameEvent, doc) Dim cd As ControlDefinition 'Set cd = cm.ControlDefinitions("AssemblyPlaceComponentCmd") Set cd = cm.ControlDefinitions("iLogic.PlaceComponent") Call cd.Execute End SubSub InsertaIlogic() TestPlace ("ilogic1.iam") TestPlace ("ilogic2.iam") TestPlace ("ilogic3.iam") TestPlace ("ilogicN.iam") ...
I made a table in the file and also split the part into 2 solids.
In the drawing, when i choose the first table mamber it shows both. when i choose to show the active member it shows the first member only (as i want).It didn't happen before i split the part.
My zip program doesn't know to include only the subfolder with the generated table files, only the whole path. i hope you will manage to generate the files, if not-i will add them with the whole path
I'm having an issue with Inventor crashing every time I attempt to follow this exact procedure:
1. I have a drawing open with an iAssembly or iPart in it.
2. I edit a view by double-clicking the view, opening the 'Drawing View' dialog box.
3. I open the 'Model State' tab.
4. In the 'iAssembly/iPart Member' menu box, I select a different member.
Now, it may or may not open the 'Save' dialog box. If it does, then I click 'OK' and poof, Inventor crashes without fail, asking to send in a crash report.
The same thing happens if I start a brand new drawing and attempt to follow the same procedure while inserting a Base view.
Now, I know for a fact that the not all of the drivers are not up to date on my computer, I am not using a recommended graphics card, and I am using SP1.1, not SP2. I have notified my IT guy about this, but he has yet to get back to me. I don't now if/when everything on my computer will be updated. I do not have admin rights to my computer.
In the mean time, Inventor has become essentially useless for me until this issue has been resolved. how I can get these drawings to start working?
Is it possible to automate dimensioning of drawing views?
Here's the situation: I have an Inventor assembly that's controlled entirely by iLogic. My users, who have zero Inventor training/experience (or with any 3D CAD software for that matter), pull up the assembly. They enter product related parameters from paper work orders into an iLogic form and hit a "Go Button". The assembly updates based on the parameters, suppressing and unsuppressing parts, features, patterns, and mates. This works great. They then hit a "Run Job" button. This takes them to an .idw where they fill out another form with order specific information and hit another "Go Button". This then cycles through every detail sheet and the parts list, deleting sheets deeemed unneccessary for the product, generating part numbers, exporting dxf's, generating an excel BOM, etc.
This works great as well. The problem is with the dimensions. They blow all apart when the model changes. I know I can run some API code to delete dangling dimensions, but is there away to programmatically create dimensions so I don't have to rely on my users remembering what needs them? I've played around with using model dimensions, but I find that they stay and remain attached even when their corresponding feature gets suppressed.
I am trying to create a lisp file to automate the placing of angular dimensions at all of the vertex's along a very long polyline. There are 500-600 nodes at least and we need the angle between the incoming and outgoing lines at every node.
Is there a way to automate this with a lisp file, or am i relegated to clicking 1800 times and waste 3-4 hours doing this?
We get these files quite often and this will be a huge benefit to us.
I've been making iLogic assemblies with hints of VB for about 6 months now. My Boss has asked me if I can write code that will effectively create drawings automatically.
What we would like to create is a rule, which when run, creates a new drawing file, places the active assembly in a base view, then place a Left, Right and Top view of the assembly and place a parts list in the top corner. Dimensions are not really important at the moment, as the sizes of the parts are in the description field and the drawings are used for assembling the product only.
What was the last version of CS to include the creation of web pages as part of Automate in the File dropdown? I've tried to reinstall the original CS on a separate machine, which fails, since it does not make nice with my current version, and the Adobe folks are ABOLUTELY NO.
I'm trying to automate the drawing-creation in our company. Steps I've taken:
- create new drawingdocument with template - Save new drawingdocument
Problem: Creation of new document works, but the next step, saving it to a specific location, fails. Error handler is initiated and displays error: Invalid procedure call or argument.
Used
Dim DXF_DWG as DrawingDocument'Create new drawing based on templateSet DXF_DWG = ThisApplication.Documents.Add(DocumentTypeEnum.kDrawingDocumentObject, ThisApplication.FileOptions.TemplatesPath & "Folded and Flatpattern DXF.dwg", True) 'Save new drawing to specific locationCall DXF_DWG.SaveAs("C:TempTest.dwg", False)
As told, the VB-code raises an error on the last command. What am I doing wrong? What are the correct steps in VBA to create a new drawing document based on a template and save the newly created drawing to a desired location?
I have a few assemblies setup that are controlled with a bunch of iLogic rules to modify all related parts when parameters are changed at the assembly level. I also have an opening message that pops up when the assembly model is opened (After Open Document trigger) to tell people how to use the parameters to make modifications.
Now, when this assembly model is placed into a drawing I am getting random pop ups of the opening message when placing views of additional models in the same drawing. If you open the drawing and try to place a base view of another model, Inventor stops to think for a minute or so before having the opening message of the iLogic controlled model pop up. The only event trigger for this message is "After Open Document" and the model is not being opened; why it is being triggered in the drawing and/or how to make it stop?
Is there a way in an inventor drawing rule to do a "save as" which saves the drawing as an Inventor dwg file rather than an AutoCAD dwg file?
The below saves as AutoCAD which is ok but I need the outputted drawing to be linked to the model. I don't want the code to save the entire assembly as this is done further down the line. I also don't want to save the current inventor dwg drawing from which the rule is run as this is just a template drawing.
1.) If you look at the attached screenshot in the Edit Sheet form there is a sheet "Revision" input field is it possible to fill this out via iLogic?
2.) We have some custom E size sheets (height always 34in width varies 5ft, 6ft, and 8ft) when we select on of these sheet sizes that we created it will display "Custom Size (inch)" when using the sheet property <sheet size> in the title block not the name of that we gave these sheets (Which creatively enough is "E-5ft", "E-6ft", and "E-8ft"). I thought I had this solved by doing this:
Dim oSheetSize As String oSheetSize = ActiveSheet.Size If oSheetSize = "Custom" Then iProperties.Value("Custom", "SheetSize") = "E" Else iProperties.Value("Custom", "SheetSize") = oSheetSize End If
then change the titleblock sheet size field from sheet property <sheet size> to custom drawing properties <SheetSize> this all works great if there is only 1 sheet in the IDW where it fails is if there is more then one sheet.
I recently start to use ilogic in inventor and discover this powerfull tool for all the daily task to be done...
I would like to add an autocad block in a drawing with some ilogic coding. Through this forum i found how to insert a sketched symbol but no how to insert a block. And convert my block into a sketch would be quite difficult...
where could i found a list of all the ilogic command??
Autodesk Product Design Suite Ultimate 2013 Win 7 Pro 64 bits SP1 Bi-Xeon E5520 (2x Quad-core @2.27GHz) Quadro Fx 1800 768Mo GDDR3 6Go Ram DDR3 667MHz ECC
I have a rule setup for drawings. I need the rule to first determine if the there is a flat pattern view present. In other words, if there is no flat patter view, I want to the rule to stop.
I am very green to ilogic and VB. Running Inventor 2013.
I'm trying to put together some iLogic code to either check all the drawing views within a drawing sheet are all the same scale, or make the views all the same scale. These drawing sheets consist of a number of individual parts (they aren't projected views from a single part).
This is for welded assemblies. We are required to generate a profile drawing sheet outlining each part that makes up the assembly. We send these out as dwg files for laser cutting so its important that the views are all the same scale.
I'm wondering if it is possible to check-in drawing into vault using i-logic?
If you check-in a drawing into our vault, it automaticly exports a .dwf to a storage server. We also have a simple button for making .pdf of the drawing to sent to the customer.
What i want to ensure is that the .dwf file and the .pdf file are the same. So when i press "make a .pdf" the rule will save my document, make a .pdf and (if possible) check it into vault. So from that point the .pdf for the client and the .dwf on the server are the same.
I made iLogic for assembly and drawing, now i want to update drawing template parameters thru ilogic, as i already linked Fx(parameters) & iProperties to Template, but for updating template i need to close file and open again that file,
currently m using this method.
What is the solution for updating drawing template (like Model Description, Drawing no.).