AutoCAD Inventor :: ILogic To Change Colors Of Parts
Mar 12, 2013I am looking for a rule that will search assembly down all levels and find .ipts with the material of plywood and when found change all plywoods to color Clear - Light.
View 9 RepliesI am looking for a rule that will search assembly down all levels and find .ipts with the material of plywood and when found change all plywoods to color Clear - Light.
View 9 RepliesBelow are 2 rules that run in succession to create and save a parts list from a base view in a drawing.
I am now trying to set the parts list style to a custom style, ideally while creating the list.
Also, I have to manually go into the list to turn off visibility of certain items (based on material), does I can do this with Ilogic? I ask because these steps precede a rule that automates placing base views of all parts in the parts list. If I could get the style and visibility right, I could automate the entire process.
Looking for changing such a style with ilogic?
Inventor & Vault Pro 2012
Windows 7, 64bit
Core i7 920@2.67
8GB
CREATE PARTS LIST____
' Set a reference to the drawing document.
' This assumes a drawing document is active.
Dim oDrawDoc As DrawingDocument
oDrawDoc = ThisApplication.ActiveDocument
'Set a reference to the active sheet.
[Code] .....
I need an ilogic rule to autmoatically change the style of the parts list in a drawing file.The parts list style already exist in the drawing.
View 2 Replies View Relatedi placed an ilogic component (wich i use as a template to later change dimentions) into an assembly file after changing dimentions i placed the same "template" ilogic component into the assembly but when i want to change something on the second component it also changes the first one and that only happens with only one feature of the component the other features work fine.
View 2 Replies View RelatedI have numerous step files which I have imported into an assembly. I now need to move all the imported files to a predefined UCS (not 0,0,0). I can do this manually by using the assemble command and selecting the centre point then selecting the centre point of the pre-defined UCS.
I have potentially thousands of parts to move in various assemblies, is there a way to do this using iLogic and if so, how?
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 curently have a rule that generates a part list automatically in a drawing. the problem is that I want the rule to be continuisly running but it keeps generating 2,3,5... parts lists. I need an if statment to check if a parts list already exists.
iLogicVb.UpdateWhenDone = True On Error Resume Next ' Set a reference to the drawing document. ' This assumes a drawing document is active. Dim oDrawDoc As DrawingDocument oDrawDoc = ThisApplication.ActiveDocument 'Set a reference to the
[Code].....
If I draw a flat square, and then a flat circle next to it, can I do things using iLogic that will make the two seperate parts interact? such as say 'if the circle contacts the square, then make the square become a circle too' or something like that?
View 3 Replies View Relatedim trying to programatically add a parts list into a drawing whilst programatically creating the drawing - the code works fine without the parts list code. The error its showing is 'Parameter incorect' on the line that sais PartsList.add(... In the past when ive got this error with other code it has been because ive used an incorrect parameter (e.g. decimal instead of an integer).
My error is somewhere inside the oPartsList.add(>>ERROR SOMEWHERE HERE<<<)
oDrawDoc = InvApp.Documents.Add(Inventor.DocumentTypeEnum.kDrawingDocumentObject,AssyTemplate,True)
oSheet = oDrawDoc.Sheets.Item(1)
[Code].....
Is it possible to replace sub assemblies using ilogic - I can only see a link to replace parts?
View 1 Replies View RelatedI need to generate an iLogic rule exporting Parts List (not BOM) from a IDW to a specific folder in XLS format.
Using Autodesk AutoCAD Inventor 2011
I need to use/write a iLogic code. I have a assy, in this assy i have parameter Height and Width. And it´s no problem to controlls this two rules/value.
But I have a problem with the rule when my height will control the number of parts
If my height is 500-1000, one part.
If my height is 1000-1500, two parts.
If my height is 1500-2000, three parts.
Is it best to use suppress or use a pattern in this case?
I would like to count all my parts in the main assembly and assign that amount to each part.
Example: Main assembly has: 10 Parts A and 5 Parts B. I would like to run a rule that "sends" that "10" to Part A.ipt and the "5" to Part B.ipt
I would like to assign it to iProperties.Status.Status. I start to understand iLogic more and more but it is nice to get a little boost in the right direction.
I Created an iLogic Rule that sets up some parameters.
I want to Automatically opens each and every Part in my assembly, run this Rule, and then save it without me having to do so manually.
I want to measure the minimum distance between 2 parts. But I want Ilogic to know what parts to measure according to what i've selected.
I have something like this but its not working... gives me always this error "
Measure.MinimumDistance: No entity named "System.__ComObject" was found."
Dim oOccurrence As ComponentOccurrenceDim oOccurrence2 As ComponentOccurrenceTry oOccurrence = ThisDoc.Document.SelectSet.Item(1)oOccurrence2 = ThisDoc.Document.SelectSet.Item(2)Catch MessageBox.Show("Please select a component before running this rule.", "iLogic") ReturnEnd Try Dim doc As DocumentDim CurFileName As String oOccurrence = ThisApplication.ActiveDocument.SelectSet.Item(1) oOccurrence2 = ThisApplication.ActiveDocument.SelectSet.Item(2) distance = Measure.MinimumDistance(oOccurrence,oOccurrence2)MsgBox(distance)
I have got some ilogic code that i have patched together to sort my parts list in inventor which works great but it will not update all sheets at the same time as when we design we have multiple sheets with parts list on and the odd one without.
add to this code to update all sheets partlists and also recognise that some sheets will not have partslists on so this will need to skip.
below is code that is used to sort
Format:HTML Format Version:1.0 StartHTML: 165 EndHTML: 4558 StartFragment: 314 EndFragment: 4526 StartSelection: 314 EndSelection: 314
SyntaxEditor Code Snippet
Format:HTML Format Version:1.0 StartHTML: 165 EndHTML: 4558 StartFragment: 314 EndFragment: 4526 StartSelection: 314 EndSelection: 314
[Code] ...........
I have a part file XXXXYYYY.ipt and I would like an ilogic code that searches if my file name contains "XXXXYYYY" to replace the X's and Y's with 1244SIMS and moves that file to a specified folder. Is there any code out there that will allow me to do this?
View 5 Replies View RelatedIs it possible with iLogic code to set a parameter in a bunch of parts equal to another paramter?
I want some iLogic code that will go into my pipe parts and make the PL param = D2.
Is there a way of using ilogic code to untick the highlighted component below. To run at assembly level to itterate down all levelsUntick (Use color overide from source component) update all parts
View 6 Replies View RelatedI made a flanged connection using I logic. Very simple Tube + Flange + Gasket + Blind flange + Bolting.Then I tried to write some ilogic rule to have Blind flange on / off when needed, hence the Gasket & Bolting also need to be off. Like in these images:
That works fine visually, but I also want the BOM to be set accordingly. For the Blind flange & Gasket my BOM is OK. But for my bolting the BOM is not OK. I tried to set the BOM structure the same way as the visibility but that failed. It only subtracted 1 bolt from my list (see code)
If Blindflange_status = 0 Then 'Bolting offComponent.InventorComponent("Bolting:1").BOMStructure = BOMStructureEnum.kReferenceBOMStructure 'Sets BOM Structure to Reference (Remove from BOM)Component.Visible("Bolting:1") = FalseElse 'Bolting onComponent.InventorComponent("Bolting:1").BOMStructure = BOMStructureEnum.kDefaultBOMStructure 'Sets BOM Structure to Reference (Remove from BOM)Component.Visible("Bolting:1") = TrueEnd If
Is there a way to set all parts within a pattern BOM structure? I made my bolting by adding 1 bolt, 1 washer & 1 nut and then pattern them using feature pattern select.
Inventor 2013
I am creating a drawing controlled by ilogic. The assembly can vary in size considerably so I have set the IDW to change between sheet size A3 and A2 accordingly using ilogic. However, when the sheet size is changed, the parts list stays in a static position.
Currently, the parts list is situated in the top right corner up against the title block and the border. So when changing from Size A3 to Size A2, the parts list ends up in the middle of the page. Is there anyway i can control the position of the parts list so it changes with the sheet size change?
I know I could simply move the partslist to the bottom left corner, which is a work around. However, I'd like to be able to keep the drawings in line with the company standard.
I have a iLogic assembly with some parts and sub assembly. I need to do a copy of this " Generator " to apply the result later in other assemblies. (something like a member of a ipart or i assembly).
Is there any way to do the copy the assembly to a new folder without the suppressed parts and subassemblies (wich are suppressed in the initial main assembly by iLogic rules)?
I tried to use "Pack and go" and "iLogic design copy", but they always bring the suppressed parts and assembly's, to the new folder and which i don't need to apply in the other assemblies.
I am Trying to add the category Field to the parts list, if a sting exists in the field. I want to run this as a rule at the Drawing Level. I can check if there is a sting in the Category Field But not sure how to add this in the Parts List.
View 4 Replies View RelatedHow to use different configuration of parts made with iLogoc in assembly? I want to have equal part with different configuration. I have a problem with the equal files.How to use different configuration of an assembly made with iLogic in assembly?
View 4 Replies View RelatedI made a flanged connection using I logic. Very simple Tube + Flange + Gasket + Blind flange + Bolting.
Then I tried to write some ilogic rule to have Blind flange on / off when needed, hence the Gasket & Bolting also need to be off. Like in these images:
That works fine visually, but I also want the BOM to be set accordingly. For the Blind flange & Gasket my BOM is OK. But for my bolting the BOM is not OK.
I tried to set the BOM structure the same way as the visibility but that failed. It only subtracted 1 bolt from my list (see code)
If Blindflange_status = 0 Then 'Bolting offComponent.InventorComponent("Bolting:1").BOMStructure = BOMStructureEnum.kReferenceBOMStructure 'Sets BOM Structure to Reference (Remove from BOM)Component.Visible("Bolting:1") = FalseElse 'Bolting onComponent.InventorComponent("Bolting:1").BOMStructure = BOMStructureEnum.kDefaultBOMStructure 'Sets BOM Structure to Reference (Remove from BOM)Component.Visible("Bolting:1") = TrueEnd If
Is there a way to set all parts within a pattern BOM structure?
I made my bolting by adding 1 bolt, 1 washer & 1 nut and then pattern them using feature pattern select. Inventor 2013
I made an Part with iLogic rules, let's call it "iLogicPart". The rules inside could create lot of different part by my input.
I want save the different parts to different name as "Part 1", "Part 2", etc. I used SaveAs to get them.
My question is: I want to delete all rules and parameters in the saved parts as "Part 1", "Part 2". And I have lot of features (the name is hard to track) which are inactive, I want to delete them at same time too.
I could manually do so, but I want to use rule to do so automatically.
At my company when producing drawings for manufacture we require a sheet for any steel profiles to be cut!..We do this by selecting the assembly from base view,hitting model view tab, selecting presentation and choosing the relevant profile from the drop down!
Once the profile is placed, we highlight the view and hit the parts list tab which obviously creates a parts list, but for the whole assembly, we then have to edit the parts list by turning off the visibility of the lines of all the parts which are not relevant!!...as you can imagine this is quite a laborious task if you have 50 different profiles.
The reason for this is to show the qty, steel grade and part number to the suppliers. My question is, any code that will take the lines of the parts list that are not relevant to the selected view and turn the visibility of those lines off?
I'm trying to create an iLogic rule that will print a text string to a cell or coloum of a parts list in inventor.
My code so far...
Sub Main()
On Error Resume Next
Dim oDrawDoc As DrawingDocument
oDrawDoc = ThisApplication.ActiveDocument
[code]......
I want to print what is in the Message Box into a cell in the parts list, and i am stumped. The cell i am trying to print to is a user property in the Parts List.
I am trying to make an iLogic rule that gets mutliple strings from different places, and prints them to a user property in the Parts List.
My ultimate goal is to print the drawing number, sheet number and the item column value to the user property with the format being...
"XXXXX-X-X"
So far, i can get the drawing number from an iProperty and the sheet number easily. But im getting stumped on obtaining the item coloum value and printing it to the same row.
This is what i have so far...
Dim DWGNUM As String = iProperties.Value("custom", "DWG Number")
SheetNumber = Mid(ThisDoc.Document.ActiveSheet.Name, InStr(1, ThisDoc.Document.ActiveSheet.Name, ":") + 1)
MessageBox.Show(DWGNUM+"-"+SheetNumber, "DXF Number")
And print the message box output to a column in the parts list
I have used Inventor for quite a while but never for much more than the odd 3D model.
I have recently created templates that allow me to use Inventor to create detailed fabrication drawings rather than relying on AutoCAD. But I have run across a question with regards to the BOM. Let me try and explain my issue.
I currently create assemblies for fabricated items. However, in the complete (or top level assembly) there may be multiple fabricated items (assemblies required). At the moment I create the BOM and manually edit the quantities required to reflect the number of assemblies (and resulting parts) that are required.
In my assembly file I created a parameter called "AssemNo" which is meant to reflect the number of assemblies required. In my part files I created a parameter called "AssemQty". I would insert the following iLogic code for each part in the assembly:
quantity - This.BOM.CalculateQuantity("Model Data", "PartNumber")*AssemNo
Parameter("Part Name:1", "AssemQty") = quantity
This works but it requires me to create that line of code for every part in my assembly. I know an iLogic code can be created to search an assembly and change parameters of all parts (see below as an example to copy Occurence name to iProperties >
' set a reference to the assembly component definintion.
' This assumes an assembly document is open.
Dim oAsmCompDef As AssemblyComponentDefinition
oAsmCompDef = ThisApplication.ActiveDocument.ComponentDefinition
'Iterate through all of the occurrences
Dim oOccurrence As ComponentOccurrence
For Each oOccurrence In oAsmCompDef.Occurrences
Dim oName As String
oName = oOccurrence.Name
iProperties.Value(oOccurrence.Name, "Project", "Part Number") = oName
MessageBox.Show(oOccurrence.Name, "iLogic")
Next
Can the two be combined?
Is it possible to have iLogic rule create parts lists out of View Representations? [URL] .......
View 9 Replies View Related