AutoCAD Inventor :: Change Part By ILogic In Assembly?
Jul 25, 2012
Before using iLogic, I created lot of iAssembly and iPart. I could change iPart factory member when I need in iAssembly.Now, I want to move everything to iLogic.
how could I change the part by iLogic code?
For example:
I generated "Part1.ipt" and "Part2.ipt",...... (I have hundred of member)
In my assembly, sometimes, I need use Part1.ipt, sometimes I need use Part2.ipt.
Which is the iLogic Code I should to use?
Inventor 2009, WIN XP.
Autodesk Inventor Professional 2013 (64 Bit) SP2
Windows 7 Professional Service Pack 1
Intel(R) Xeon(R) CPU E5645
12.0 GB Memory
View 9 Replies
ADVERTISEMENT
Apr 1, 2013
I`m looking for the iLogic code that can change one parameter (user defined) for each (ipt) part in assembly (iam)
The one below doesn`t work.
Sub Main Dim oApp As Inventor.Application = ThisApplication Dim oAssy As Inventor.AssemblyDocument = oApp.ActiveDocument For Each oSubDoc as Inventor.Document In oAssy.AllReferencedDocuments On Error Resume Next Parameter(oSubDoc, "FH") = 15.26 Next End Sub
View 5 Replies
View Related
Jul 25, 2012
How to run iLogic Rule which I created for .ipt file in assembly?
As I have a myPart.ipt file with iLogic Rules which could create part1.ipt, part2.ipt, ..... (hundreds of them).
Now, I want creats iLogic Rule in myAssembly.iam to run the iLogic Rules in myPart.ipt in order I could create correct .ipt file to be used in myAssembly.iam.
View 4 Replies
View Related
Jul 26, 2012
I have the same ilogic part placed in the same assembly, and i am trying to drive two different configurations of the same part and when i apply the configuration it changes both of the parts but to only one of the configurations.
Is there a way to drive them seperately even though they are the same part.
View 5 Replies
View Related
Jan 9, 2012
I have made an iLogic external module who copy the iProperties from an Excel files, when i open the module from the *.ipt file il works perfectly. But i need this function from *.iam files.
Something like this: when i click with right button in one selected part of assembly i can open the module only for this part and when i save it save the change for all modify part of *.
View 1 Replies
View Related
Jan 8, 2013
I'm trying to write a script which would process all the ipt files within assembly and launch certain functions according to a ipt file type.
I've already made such script for dimensioning parts which work for standart parts but not for metal sheets.
Here it is:
Sub Main Dim oApp As Inventor.Application = ThisApplication Dim oAssy As Inventor.AssemblyDocument = oApp.ActiveDocument For Each oSubDoc as Inventor.Document In oAssy.AllReferencedDocuments If oSubDoc.DocumentType = kPartDocumentObject Then Dim oPartPropset As Inventor.PropertySet = oSubDoc.PropertySets("Design Tracking Properties") Dim oPartParam As Inventor.PropertySet = oSubDoc.PropertySets("Inventor User Defined Properties") Dim oParameter As Parameter For Each oParameter In oSubDoc.ComponentDefinition.Parameters oParameter.ExposedAsProperty = True Next oParameter If oSubDoc.SubType = "{9C464203-9BAE-11D3-8BAD-0060B0CE6BB4}" Then Dim d1 = Round(SheetMetal.FlatExtentsLength, 1) Dim s1 = Round(SheetMetal.FlatExtentsWidth, 1) Dim g1 = Round(Parameter("Grubość"),1) FindOrCreateProperty("Długość [mm]", d1, oSubDoc, True) FindOrCreateProperty("Szerokość [mm]", s1, oSubDoc, True) FindOrCreateProperty("Grubość [mm]", g1, oSubDoc,
[code]....
this code distinguishes parts from sheet metal, and launches appropriate functions to get their dimmensions. It just doesnt work for metal sheets somehow. Seems like SheetMetal.FlatExtentsLength is performed from within the assembly, not part as it should be. I must have the addressing wrong. I've tried many things and different functions but nothing works for sheet metal parts.
This code might also be useful for different purposes. I'm also trying to lunch some external scripts for each part within an assembly, but there is no direct function for that (there is one only for internal scripts , based within the file).
View 1 Replies
View Related
May 14, 2012
I'm wondering if I can move a part in iLogic or rule via X,Y,Z coords say from it's current location to 0,0,0?
I don't want to use constraints because it simply can't jump from one constraint to the next without blowing up.
View 9 Replies
View Related
Jun 12, 2013
Is there a standard command or command sequence that allows for the changing of a parameter, say length, of a component from within an assembly. I'm looking to compile a code that allows for a template to be created, then that template will do changes based on text box input and then save out the modified parts with new part numbers.
View 2 Replies
View Related
Oct 24, 2013
I have a multi body part that I componented into an assembly. I am trying to get the assembly parameter in this case, "Height" to drive the parameters in the part model. I think I am using the right code but I get an error when I run the rule.
View 5 Replies
View Related
Oct 6, 2011
I've done an Addin which contains a "Place iLogic Component" function. This funcion work properly and the iLogic form is opened at place component time. Now, i would like to be able to open the form after the insertion, for edition purpose. So, i'd like to open the iLogic form of an assembly component (occurence) with the context menu for example.
So, my question is : Is there a way to check if a part or an assembly contain an iLogic form and to open it through Inventor 2012 API ?
View 2 Replies
View Related
Nov 17, 2011
I have a rule in the top assembly to update & want to run this as a final 'clean up' after various rules have run in sub assembly parts.
I have a rule within a part at the end of the line. I want this rule to goto the top assembly & run the 'Update' rule.
View 4 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
Dec 6, 2012
When we send 3D models to customers, we always derive the assembly to make it 1 solid part, so the customer cannot disassemble it to copy our product, and then save it as a step file.
I want to Derive an assembly to a part and then save it as a *.step file with an ilogic rule.
I worked out the last part, but i cannot find the Derive assembly code anywhere.
Im not an experienced programmer, i can only Copy paste, so if the solution is already posted in a simular rule, i will not be able to pick what i need from the code
View 2 Replies
View Related
Jul 10, 2012
can't get the COG of a single part inside an assembly using the default feature of iLogic:
centerPt=iProperties.CenterOfGravityOfComponent("part1:1")
Wikihelp states that it's possible to get the COG of a part within an assembly.It doesn't seem to work anytime getting an error on some missing included references .do I need a Sub-Rule inside the single part?
View 2 Replies
View Related
May 10, 2012
Change pattern ilogic. How do you change the distance and quantity in an assembly with ilogic?
It is simple in a part but in an assembly the parameters and equations do show.
View 1 Replies
View Related
Oct 26, 2011
Is there a way to set an assemblies bill of material setting to reference through iLogic?
View 3 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
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
Jan 27, 2013
I got this code earlier from Curtis_Waguespack, and i would like to add a setting... When i run this rule it Derives the assembly, but LOD is set to Master, i would like it to be set to my own (Configurator) LOD...
I don't seem to be able to find anything in this code, that defines LOD...
So far im doing ok with the standard ilogic code, but when it´s API or VBA code im lost.. which leads me to this.. i've been searching the forum back and forth to find a code that performs the feature "Shrinkwrap", and somehow everything i have found so far does not work... even the code example in Inventors help menu under programming, Therefore im trying to solve this with Curtis's code as staring point..
'set a reference to the assembly component definintion.'this assumes an assembly document is open.Dim oAsmCompDef As AssemblyComponentDefinitionoAsmCompDef = ThisApplication.ActiveDocument.ComponentDefinition 'define the path and file nameDim sPathandName As StringsPathandName = ThisDoc.PathAndFileName(False)
[Code] .......
View 9 Replies
View Related
Oct 1, 2013
I have an assembly of stair made from steel. There are lots of part the same. Is there a way to make a hole (inside assembly) to one and that hole would appear on all of them.
And another problem, how can I made cut (inside assembly) through more then one part so that would affect a part also when I open it alone.
View 9 Replies
View Related
Oct 21, 2013
I'm slowly getting there with iLogic, so I'm really just looking for the function / call to change one part from Frame Generator, to another part from Frame Generator.
Product Design Suite Premium 2014
Inventor 2014 Professional
Windows 7 Professional 64 bit
Intel Xeon E3-1240 @ 3.4 ghz
Nvidia Quadro 600
8.00 gb RAM
View 2 Replies
View Related
Oct 1, 2013
The commented code does not work. I want to be able to open a part and change its size parameters before i open the assembly. this code will run as an external rule in a new empty file.
If i can do it without opening the part, that is even better. Test can I open a part, change a param, then close part.
Dim fname As String
fname ="C:Workspacemy_progchanF_BB_L.ipt"
Dim pDoc as PartDocument = ThisApplication.Documents.Open(fname,False)
pDoc = ThisApplication.Documents.Open(fname)
These are just attempts to find a syntax that works. I need the method to change the parameter.
'param = pDoc.PartComponentDefinition.Parameter.Param("TKNS")
'pdoc.parameter.Param("TKNS") = 8
pdoc.Save
pdoc.Close
View 4 Replies
View Related
Dec 23, 2011
I'm using ilogic rules to customize an assembly generated by content center of frame generator. I would like replace the parts on my assembly when I change an assembly parameter multivalue.
View 4 Replies
View Related
Mar 19, 2012
I have design tree like this:
Main Assembly
L Sub Assembly1
L Sub Assembly 2
L Sub Assembly 3
L part 1
in part i have a parameter name ("Panjang")... how to control "Panjang"?. I cannot access a part parameter in Sub-assembly.
[URL]
View 9 Replies
View Related
Mar 30, 2012
there is a way to change the template used for a part or assembly. The problem is that I created a template to fit my needs but I had to update it and the update doesn't effect the parts created with the old version one. How do update the templates of the files created using the old template?
View 4 Replies
View Related
Jun 6, 2013
My part color is yellow. In the assembly It shows as gray.
I cant seem to get it to change to match the part color. I used to know why this happens and knew how to fix it but seem to have forgot. How do you get this to work?
I also recently loaded 2014, but had the same problem with 2013, so its not a release issue.
View 4 Replies
View Related
Jul 26, 2013
I have a flange that I use iLogic and the parameters list to update the different styles. My problem is that my flange won't update until after I hit save and update. My other square flange is not this way. As soon as I change the parameter in my square flange it immediately updates. Is there anyway I can get my round flange to update immediately like my square flange? I attached pictures below.
View 1 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
Nov 24, 2011
This is my first time using Inventor but I've been using ProE for several years in school. A friend of mine told me about a feature in ProE where you are able to define a part and then define one of the lengths as it is placed into an assembly. For example I would define a 2x4 part with a length of 84inches. If I wanted a 2x4 of 68inches in my assembly I would use the same file but simply change the 84 to 68. How can I do this with Inventor?
View 1 Replies
View Related
Oct 31, 2011
I have a part that occurs nine times in an assembly. These were all the same parts before but now I need to make them table driven iParts in order to add a custom iProperty that changes to make them all different. They are all the same except for this on iProperty field that changes.I can create the iPart no problem. My questions are:
1.) Should I just open the part file and make it an iPart?
2.) Do I need to replace the files in the assembly somehow?
3.) I would assume that I can just edit the file to make it an iPart and then use some kind of "change component" right click to select which one goes where right?
4.) Is there some other workflow I should be using?
View 5 Replies
View Related
Dec 6, 2011
I want to simply set a custom iproperty as the Description in each part file within my assembly. I can do this easily at part level with ilogic but I want to be able to run the rule from the assembly level and all the parts run the rule. I am struggling to find a way to do this.
I think this may be the best method I have found but I think it must be far easier?
[URL].......
View 9 Replies
View Related