AutoCAD Inventor :: ILogic Subassemblies Won't Update Unless In Their Own Environment
May 2, 2013
I have an assembly which is made with a sub assembly. The sub assembly has iLogic code that both resizes it's parts and suppresses parts that arn't needed after a change in length.
I am trying to suppress part that are labeled as "Reference" on the BOM Strutcture and I can't get the program to cycle through the subassemblies. The following code runs through all the components on the top-level assembly but I can't get it to cycle through the subassemblies.
oCompDef = ThisDoc.Document.ComponentDefinitionoAssemblyComponents = oCompDef.OccurrencesDim oOccurrence As ComponentOccurrenceDim oSubOccurrence1 As ComponentOccurrenceFor Each oOccurrence In oAssemblyComponents If (oOccurrence.BOMStructure = BOMStructureEnum.kReferenceBOMStructure) Then Component.IsActive(oOccurrence.Name) = False Else Component.IsActive(oOccurrence.Name) = True End IfNext
I am looking for a way to create an external rule that will allow me to turn off the visibility of bolt generator items in the model while I am looking at the drawing. Bolts may be buried several subassemblies (4 - 6) deep.
Currently I am using I-logic and a form. I have an assembly that I am pushing a volume from a part to the main assembly. The volume updates in the part fine. The issue is with the form is not updating when the file parameter updates. If I exit the form and run the rule manually then the form updates. how to update the form at the same time?
I have a global form which is exactly made for a specific assembly for configuration of this very assembly. To make things easier for the user I call another external rule which only opens exactly this assembly.
Now when the user opens the form the assembly is not open and obviously can´t reference the used parameters.
Even after loading the assembly the parameters are not available, which results in something like this:
So this is a really simple question, is there a way to update a form so that it rereads the parameters from the assembly?
What I tried is using iLogicForm.CloseGlobal("Name of form") to no availability and then open it again with iLogicForm.ShowGlobal("Name of form").
But I couldn´t find any further info on the iLogicForm Commands.
I am after a way of accessing the update styles on dwg so that I can run with rule below as most of our drawing stds have changed and old dwgs need updating the work flow is as follows.
I need to access manage tab then update styles,then yes to all,OKUpdate all sheetsfind all parts list within all sheet and then annotate , style on format tab and then select Parts list - this will change all my old parts list to current style definition.Either run at begining of code below or run as seperate code
On Error Resume NextDim oDrawDoc As DrawingDocument oDrawDoc = ThisApplication.ActiveDocumentDim Sheet As Inventor.SheetDim Cursheet As String Cursheet = oDrawDoc.ActiveSheet.Name For Each oSheet In oDrawDoc.Sheets oSheet.ActivateDim oPartsList As PartsList oPartsList = oDrawDoc.ActiveSheet.PartsLists.Item(1)If Not oPartsList Is Nothing Then Resume Next'Call oPartsList.Sort("ITEM")Call oPartsList.Sort("PART NUMBER", 1, "DESCRIPTION", 1, "QTY", 1)iLogicVb.UpdateWhenDone = TrueActiveSheet = ThisDrawing.Sheet("Sheet:1")ThisApplication.ActiveView.FitEnd If Next
I am trying to put an immediate update box on my form in ilogic. I want to be able to change parameters on my form without updating the model. There is this option in the parameters window but not in the form. How can I accomplish this?
I have an ilogic assembly that I change to different widths. And I want ilogic to put the part number into the title block according to the size of the assembly.
What I have works but won't update on its own. I have to open the ilogic rule and close it, then open the i properties of the idw and close before it will update.
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.).
Is there any way to force an update of mass property values of a component from within an iLogic routine?
I am trying to produce a calibration chart showing the volumes of an irregular shaped object by taking incremental slices off the component and accessing the "volume" of the remaining portion, then writing the the results to an external file - All from within a "For - Next" loop.
The main routine works O.K. but the resultant chart only shows the original starting volume for each slice instead of the required reducing volumes.
I am a novice with iLogic and can only assume that I must somehow "update" the mass properties of the sliced object before reading its new volume on each pass.
The rule iterates through an assembly looking for parameters. If it finds them it 'pushes' the value down from the top level Assembly into the sub-components.
It works well, but each component updates dynamically as the parameter value is changed. This looks a bit jerky and weird.Is there any way to write the script so the the updates all happen at once at the end?
' set a reference to the assembly component definintion.' This assumes an assembly document is open.Dim oAsmCompDef As AssemblyComponentDefinitionoAsmCompDef = ThisApplication.ActiveDocument.ComponentDefinition'Iterate through all of the occurrencesDim oOccurrence As ComponentOccurrenceFor Each oOccurrence In oAsmCompDef.Occurrences'check for and skip virtual components'(in case a virtual. [code]...
as a part of automating manufacturing drawings, am trying to include ilogic code in the drawing , that would accept values from the user and store it as "user parameters" and make corresponding changes in the inventor drawing file.So, to replicate my issue on a smaller scale, i had created 2 parts and created an assembly out of these 2 parts. I used the assembly in my drawing.
In the Drawing i created a user parameter .. say "external_param". I am opening the drawing and changing the value of the user parameter through the (Fx) parameter table.
doc = ThisDoc.DocumentIf external_param >= 50 And external_param <= 99 ThenParameter("block_1.ipt.d0") = 15 'change the length of the blockParameter("block_1.ipt.d14") = 3 'change the number of holes in the blockElseIf external_param >= 100 And external_param <= 199 ThenParameter("block_1.ipt.d0") = 40Parameter("block_1.ipt.d14") = 5ElseIf external_param >= 200 And external_param <= 299 ThenParameter("block_1.ipt.d0") = 80Parameter("block_1.ipt.d14") = 6ElseIf external_param >= 300 And external_param <= 399 ThenParameter("block_1.ipt.d0") = 160Parameter("block_1.ipt.d14") = 9End IfRuleParametersOutput()iLogicVb.UpdateWhenDone = True'InventorVb.DocumentUpdate()
As you can see, i have commented out InventorVb.DocumentUpdate() , im not quite sure what would accomplish the update and save of the assembly document in the background (without prompting for a save/update). I have also tried thisDoc.Save and thisdoc.update. Using these 2 commands along with the InventorVb.DocumentUpdate() or iLogicVb.UpdateWhenDone caused Inventor to Crash.
The right click context menu on the top level assembly (on the model tree in Inventor) has the option of 'Open Drawing'.
Is there a way to do that via iLogic? Unfortunately I can't figure it out if there is. I would like to open and update the relevant drawing.
Also have tried it the other way around, that is to run my rues in the assembly from the drawing since the drawing is the parent. But I am not sure how to reference the assembly.
I'm running an iLogic based model where I have a technical housing with 2 cover parts on top.
The first cover part is the basic part.
I use iLogic to assign a RAL-color to several parts in the assembly, also to that cover. The color is assigned to several features of the cover part.
The second cover part is almost identical to the first one.
So my first feature in the second cover part is a derived part of the 1st cover. I derived all the bodies.
When I'm in my assembly and I pick a RAL-color in my created customization form, the RAL-color only changes in the 1st cover part (the original), but it doesn't change in the second cover part, the derived body.
But....
when I manually open the 2nd cover part, and I right click on the derived feature and click on 'Edit Derived Part' ; the new color shows up immediately!
So, my question is if there is a rule for iLogic to update the color automatically?
I want a ilogic rule syntax for following process:
I have one excel sheet it consists around 5 sheets for Plate, Flats, Rounds, etc. When i am run the rule then it will ask and do the following:
Ask the thickness value.It will search thickness value in “D:LINUS KOTTEstock numbers.xlsx” in sheet 1If thickness value found then fill the stock number in iproperty(project tab-stock number)
Here i am using different rules for plate, flat, round, etc.,
How to make Automatic Update propeties for Flat Pattern Extens. I have write code and setting rules trigerred by event (Before save, Any model Parameter Change) but if some parameter change properties isn't automatic update. So could some one tell me how to solve this problem.
I am trying to create an iLogic (or VB) rule to update an active drawing title blocks from our Template File.I don't want to use any of the external software (Transfer Wizard etc), we just need a simple rule that will update the title blocks when we need to.
I have one problem in ilogic i developed the model using ilogic rules and dimension values updated through the User interface form.
problem is while entering the values in UI, model updates automatically, but I want to stop automatic update and after entering the all the parameters in the UI then click the done button only update the model.
ilogic function to update local styles to match Style Library?
I have a snippet of code that, on a drawings, deletes the current parts list (if one exists), then inserts a new parts list which I want to be up to date with the Style Library.
Autodesk Inventor Professional 2011 Windows 7 Enterprise, 64-bit
I am working on a new concept design for one of our customers. A critical design parameter is the weight of each of several sub-assemblies.
I have an idw of the top level assembly where I have added Parts Lists of each of the critical subs to show the weight of the components used in each sub assembly. I would like to add a line at the bottom of each Parts List that shows the total weight of that sub assembly. I would also like the header of the Parts List to display the Part Number (from the sub assembly iprops).
Is there a way to get why I want from IV? I am currently using IV 2012. I have attached a .pdf mockup of what I want.
If i make a Inventor DWG and insert one Assembly with lets say 7 subassemblies i want to color the Edges differend color i the DWG ( by right clicking on the subassembly and properties).
This takes a lot of time especially when i have differend wievs to bloon all of the subassemblies, i have to open the assemblies in the three on by one and change the edge color.
Is there an easy way to copy an assembly that has sub-assemblies within it. Make changes to that assembly and some of its sub-assemblies and have no effect on the original.
The model I have been working on has been trying to change it's colour all day. Finally I had a crash 'graphics adapter stopped working' and when I re-opened the model it had gone all blue. The top level assembly is all blue but the subassemblies are the proper colours when you open them.
I'm updating my graphics driver which should maybe stop the problem re-ocurring but in the meantime I need to get my top level assembly to display as per the colours in the sub assemblies.
I have an assembly consisting of both sub assemblies and individual parts.When I insert the bill, it is only showing me the parts and assy's needed to build the assembly.Is there a way to have it list the sub assemblies and then their lower level parts, with quantities?
I've got a machine designed that has a couple hundred parts - originally built as one main assembly (with a number of weldment subassmblies). The problem is that the BOM is too large to feasibly have on the drawing and still show assembly detail. I'm trying to avoid a multi-sheet configuration.
So I've grouped certain items and demoted into subassemblies. The problem is that all the subassemblies are attached to a main frame- and I'd like to show this frame in each of the subassemblies as a reference. Is there a way to add a "phantom" copy of the framework to each of the subassemblies to that it can be seen? (and the assembler can see how the subassembly is mounted on the frame) Otherwise all these parts are just floating in space on the subassembly (and constraints are lost on the subs).
I'd like to keep the frame on the top assembly, as it may be customized for future machines, while using the same subassemblies.