AutoCAD Inventor :: Using ILogic To Set Component Visibility Based On Positional Representation
May 30, 2013
what code I would use in an assembly if I want to enable and make visible certain parts depending on the positional rep I am using.
Basically I am having trouble reading the pos rep into an iLogic code
View 5 Replies
ADVERTISEMENT
Oct 11, 2011
The problem
- I have a top level assembly (lets call it '01.iam', which contains a range of subassemblies (e.g. '02.iam', '03.iam' etc)
- The subassemblies have positional representations
- I want to be able to manipulate the pos.rep's from the top level using iLogic.
I found this snippet of code on the forum which works when I create the rule in one of the subassemblies.
ThisApplication.ActiveDocument.ComponentDefinition.RepresentationsManager.PositionalRepresentations("MyPosRep").Activate
But I'm having trouble adapting it to work from the top level, as I would like all my rules saved in one place.
View 4 Replies
View Related
Apr 30, 2013
I am having problems with creating positional representations. I create simple representations that go from closed to open and when I finish creating the animation I have a position representation called WorkPR1 that overwrites any positional representations I have created. What do I need to do to get my representations to be used or how do I modify the WorkPR1 representation to show what I want?
I'm using 2014
View 2 Replies
View Related
Aug 21, 2013
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.
View 6 Replies
View Related
Aug 9, 2012
I'm looping trough positional representations in a assembly and I would like to determine if one of them is failing.
View 4 Replies
View Related
Aug 17, 2012
I have an issue where a two positional representations are showing in the spreadsheet for editing, but not showing in the tree view.
I cannot delete a representation from the spreadsheet.
View 3 Replies
View Related
Jul 18, 2012
We are running Inventor 2013 and I am trying to create a simple positional representation of a small assembly. For some reason, the "New" option is grayed out in the positional representation browser.
I can't remember ever having trouble creating them in past releases.....
View 2 Replies
View Related
Nov 7, 2013
Is there some way to do a BOM based on a representation? Also how do I get sub-assemblies to show as the individual parts?
View 2 Replies
View Related
Dec 12, 2012
I'm configuring a band with different supports. Each support is configured with a range; 600-900, 900-1200, 1200-1500 etc. those ranges can be adjust by 50mm and those steps are specified by the pos reps (see attached image).
All the different supports are put in the top assembly and in this assembly I want to switch between the positional representations. I tried to use:
ThisApplication.ActiveDocument.ComponentDefinition.RepresentationsManager.PositionalRepresentations("MyPosRep").Activate
But it won't work. I guess I have to replace "ComponentDefinition" in one way or another to the component name, but I don't know how.
View 3 Replies
View Related
Aug 30, 2012
I have an assembly which has a few components suppressed.
My end results is another copy of the assembly (with copies of the all the parts) in another directory
Now i am able to create copies of un-suppressed parts using; (this allows me to SaveAs assembly components which are not suppressed)
DocumentsEnumerator = ThisDoc.Document.AllReferencedDocuments
And save a copy of the assembly using
ThisDoc.Document.SaveAs
I also added the fllowing snippet (which I am not sure what is does), but it does not work for me
Component.SkipDocumentSave = true
When I open the newly created assembly, I still see the suppressed components in the model browser
I want to either;
Skip saving the of the components in the model browser (i.e. the Assembly)
OR
Delete the suppressed parts in the Assembly, so that they do not save altogether
View 3 Replies
View Related
Apr 17, 2012
I have received a great solution from Bobvdd allowing ilogic control of the view rep in a part file (not an assembly file). The code below works brilliantly when the part file is the active document. However when the part is placed in an assembly and the ilogic is run with the assembly active, the code produces no result. How to modify the top 6 lines of code?
Dim oApp As Inventor.Application
oApp = ThisApplication
Dim oDoc As Document
[Code]....
View 2 Replies
View Related
Apr 16, 2012
How to change the view rep in an assembly
(using oAsmCompDef.RepresentationsManager.DesignViewRepresentations.Item("Red").activate) -
However I am trying to achieve the same with iLogic in a part file (multi-solid).
View 2 Replies
View Related
Mar 21, 2013
I'd like to set up a keyboard shortcut so that when I press the 'V' key, inventor toggles the visibility of the selected part or assembly. However, "Visibility" seems to be about the only command that doesn't exist in the list of keyboard shortcuts*. I found this post in which someone says it's not possible, but might be using VBA. I've done some iLogic but know nothing about Inventor's inner-working VBA. I'm wondering if there's some workaround, VBA or otherwise, that'll allow me to toggle visibility using the 'V' key.
*actually it does but it says it's only available for use in Inventor Studio. Go figure.
Using: Autodesk Inventor 2013 Product Design Suite
View 2 Replies
View Related
Nov 8, 2011
I am using this code to turn visibility of components off in IDw file, what I need top turn visibility of a component of in a subassembly.
'oDrawingDocument = ThisApplication.ActiveDocument
'Get the first view
'Dim oView As Inventor.DrawingView
'oView = oDrawingDocument.ActiveSheet.DrawingViews.Item(2)
[Code] .........
View 2 Replies
View Related
Feb 18, 2013
Why the visibility cannot be toggled on/off in drawings? Why the visibility selection is greyed out?
View 9 Replies
View Related
Aug 23, 2012
How can I change size of the content center part in an assembly based on parameters using iLogic.
There is also the possibility that I would need to replace from content center. I have been unsuccessful in adapting previous examples to work as I need. attached is an example of a part I am tryig to change with parameters and the start of some iLogic. I am using inventor 2012.
View 3 Replies
View Related
Oct 11, 2011
In my neverending battle to find a way to turn off unneeded components in an assembly, I'm trying my hand at modifying component visibility with a custom View Rep. View reps seemed to pose fewer issues than LOD's (in that you can have a drawing and model open at the same time without a million error messages)......until I tried to make a pattern.
When first placing a new subassembly component into an assembly, it will automatically place in the "Last Saved" View Rep. Since certain parts may be invisible in my "skeletal" subassembly, this is ideal. HOWEVER, when I try to pattern this subassembly, all of the occurrences absolutely insist on displaying at the "Master" View Rep. This makes no sense to me whatsoever and destroys yet another workflow at the 99% mark. I understand that I can change the view rep manually, but manual workarounds and corrections defeat the point of using iLogic to manipulate our models.
Am I the only CAD user who wants the simple ability to "turn off" an assembly component? iAssemblies are not an option due to the shear number of combinations of unneeded components.
View 4 Replies
View Related
Oct 1, 2012
Drawing based on .ipn shows (should not show) surfaces used to trim, even their visibility are turned off.
Drawing is normal if based on .iam.
Only one part of the assembly is the problem. Other parts, also with trimming surfaces, are shown normal.
Please see images in .pdf attached.
View 2 Replies
View Related
Jan 16, 2013
What I am trying to do is insert a part into an assembly file using iLogic. I basically want to mimic Inventor’s “Place” command using ilogic, maybe something like this:
oPath = ThisDoc.Path & ""
oFile = "File.ipt"
Component.Place(oPath & oFile, False)
View 1 Replies
View Related
Mar 1, 2012
How can I include component suppression in the idw views? I suppress a component in the ipt or asm, but it doesn't
disappear from the drawing views. Is there a way to carry this over to the drawing?
View 1 Replies
View Related
Dec 28, 2012
Is it possible to skip the small preview window and the parameters display when i place an iLogic component white the command Place iLogic Component.
View 1 Replies
View Related
Aug 12, 2013
I'm trying to play around with iLogic for creating dynamically dimensioned subassemblies. I've created my dimensioning rules that link to the parts I wish to change dimensions on.
Parameter("Bridge Spine:1", "BridgeLength")=Length
And I've tested this in the SubAssembly I've created and all appears fine. However when I go to insert the sub assembly into the main assembly I get the following error:
Parameter: The component named "Bridge Spine:1" was not found.
I've noticed that the new sub assembly has created new parts with the extension -01 on the end of each part (As expected) It appears that this link is being lost in the rule for the new sub assembly. i.e the rule is looking for Bridge Spine:1 instead of Bridge Spine-01:1
View 3 Replies
View Related
Nov 7, 2013
I am trying to set the appearance of sub-components in an assembly using iLogic.
Dim oDoc As Inventor.AssemblyDocument = ThisApplication.ActiveDocument Dim oCompDef As Inventor.ComponentDefinition = oDoc.ComponentDefinitionDim oCompOcc As Inventor.ComponentOccurrence 'parts in the assemblyFor Each oCompOcc In oCompDef.OccurrencesoCompOcc.Definition.Document.ActiveRenderStyle = oCompOcc.Definition.Document.RenderStyles("HVGM")Next
View 3 Replies
View Related
Oct 19, 2012
I have a code which I want to rotate a part. I have a text parameter 6 and 7. If one of the values is active I want to give the component a certain rotation.
Under the 'Hoekkoppeling' parameter is the angle constraint.
Below the
If Parameter ("KlemHoekstuk-01: 1", "KoppelingType") = 7
Then Hoekkoppeling = 60 deg
ElseIf Parameter ("KlemHoekstuk-01: 1", "KoppelingType") = 6
Then Angle = -60 deg
End If
I now get always an error on the second and fourth line.
I feel that the specify for the value is incorrectly.
View 4 Replies
View Related
Oct 11, 2011
I've noticed that one can turn off the visibility of an entire component pattern by manually right-clicking the pattern in the browser and unchecking "Visibility". However, when one tries to automate this process with the following code, only the first element of the pattern is made invisible.
Component.InventorComponent("Pattern1").Visible = False
Is there a better way to do this, or will I be forced to develop a "workaround" like first changing the number of elements to 1?
I've been desperately trying to find a way to "turn off" unneeded assembly components without iAssemblies or LOD's, but Inventor always finds a way to stop me. This workflow of turning off visibility and setting BOM status to "Reference" would work if only I can make patterns invisible, also.
View 1 Replies
View Related
Sep 19, 2012
I'm working on a main assembly. I want to edit the i properties of components within a sub-assembly, this is fine for "RING:1"
iProperties.Value("RING:1","Project", "Description")="A79-H020B001"
but I get an error message when i try to edit the iproperties of a patterned component within the sub-assembly.
View 3 Replies
View Related
Dec 2, 2013
I created a simple Part with some parameters to drive dimensions. Saved the part. I created an Assembly. Saved the assembly. Clicked Place iLogic Component. The Place iLogic Component window appeared Selected the Part. I can see the preview window (Part-01) & the parameter window... Used default values. Hit OK NO PART INSERTED! Using Inventor Pro 2014 64-BitLudesroc
View 1 Replies
View Related
Sep 20, 2013
How to modify the code below to delete suppressed parts in a pattern (entire pattern)?
Dim oComp As ComponentOccurrenceDim oComps As ComponentOccurrencesoComps = ThisDoc.Document.ComponentDefinition.OccurrencesFor Each oComp In oCompsIf Component.IsActive(oComp.Name) = False Then oComp.DeleteNext
Code works fine if there are single instances of the part. It throws a error when you have a suppressed pattern.
View 7 Replies
View Related
Nov 22, 2011
I have a wall of frames, if you will, and some frames within this wall are different sizes. When doing the BOM, I want to be able to combine anything that has the same stock number as well as the same cut length. The only way I have thought to do this so far is to cycle through each stock number and if the cut length is the same, I override the quantity of one and change the BOM Structure of the other to "Reference".
How can I change the BOM Structure to reference without selecting the part or going through the BOM Editor? Is there some VBA code I could utilize? I am striking out by solely using iLogic.
View 2 Replies
View Related
Feb 9, 2012
Is there code for changing the color (or other properties) of the visible edges of a component in a drawing view, the same way I can do it manually by right-clicking a component and choosing Properties?
I wrote this rule to change the color of each individual drawing curve:
Edit: Ignore the "<!". It's the only way I could get the iLogic code to successfully post in the message
Spoiler (Highlight to read)<!Dim drawViews AsDrawingView
For Each drawViews In ThisApplication.ActiveDocument.ActiveSheet.DrawingViews
occ3 = drawViews.ReferencedDocumentDescriptor.ReferencedDocument.ComponentDefinition.Occurrences.ItemByName("GF_Plenum:1")
Dim newColor3 As Color
newColor3 = ThisApplication.TransientObjects.CreateColor(0,255,255)
[code]....
View 2 Replies
View Related
Feb 22, 2012
Show on Place Component
If I set this to true, then when I "place iLogic component", I don't get the form displayed or the parameter table or the model preview.
If set True, displays the form when placing this model as a component in an assembly. This setting affects Place Component and Place iLogic Component. If the template file has a form, this setting also affects Create In-Place Component.
View 1 Replies
View Related