AutoCAD Inventor :: Running ILogic Rule In Assembly From Subassembly Part
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
ADVERTISEMENT
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
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
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
Aug 2, 2013
I need a way to run a rule which is saved in my top-level assembly using iLogic rule which is saved in a part file in the parent assembly.
I have even tried using an external rule in a txt file, but that gives the error "Component: This function can only be used in an assembly." - which makes no sense to me. I hope I am just missing something simple. I cant believe with all its other strengths, that iLogic would be so limited in that regard. Why is there not simply a snippet under the 'Run Other' that allows you to specify an assembly file and the rule name? (like there is for running a rule in a component from the assembly)
View 4 Replies
View Related
Jul 12, 2013
Is there a way to edit constraints inside a subassembly from the main assembly, using ilogic?
I would like to supress a constraint (let's call it mate:8), which is inside a subassembly. When I right click on that constraint, and select "Capture Current State", it inserts Constraint.IsActive("Mate:8") into my iLogic code. However, there is already a mate:8 in my main assembly, so how can I be more specific so that iLogic knows which constraint I am talking about?
Inventor 2014
HP Pavilion dv6t-6b00
Intel Core i7 2670QM
AMD Radeon HD 6490M
8gb RAM
Windows 7 64 bit
3Dconnexion SpaceExplorer
View 9 Replies
View Related
Sep 5, 2012
I have an ilogic rule with multiple Subs. How could I run one specific sub contained in that rule from an iLogic form or another rule?
View 2 Replies
View Related
Oct 3, 2012
Is there a way to run a rule which is part of a sub assembly from the parent assembly?
I have a parent skeleton assembly containing many icopy assemblies. These subassemblies are based of one master assembly which in turn has a common part. (hence why I am using the icopy feature)
This standard part has an ilogic rule which varries the number of creases in a wall panel. eg. when the panel is 1200 wide there are 2 creases, when the panel is under 800 wide there is one crease and when the panel is less than 600 wide then there are no creases.
When I insert the icopy assembly into the master skeleton assembly and click select the widths of the panels they stretch and change to suit my skeleton. However I am having to visit each copied panel to run the crease rule.
Is there an operation or some sort of trigger I can implement to make this rule run as soon as the sub assembly is inserted?
Inventor 2010 Pro SP4, Vault Collaboration 2010
HP Z820 Xeon E5-2643 0 @ 3.3Ghz 16.0GB RAM
Nvidia Quadro 5000
View 9 Replies
View Related
Apr 23, 2013
The setup is: I have a rule which first gets a number of user parameters via input boxes.This rule then runs a number of other rules, using:
iLogicVb.RunRule("Rule 1")iLogicVb.RunRule("Rule 2")iLogicVb.RunRule("Rule 3").Each of these rules control parameters, part/feature/constraint suppression etc. in the top level and subassemblies/parts based on the previously obtained user parameters.
All the rules have the 'Don't run automatically' option selected, so all should only run as intended when I manually run the first rule.When I run the first rule, I enter all the parameters, and the subsequent rules run.The problem is, the suppression states etc. in the subassemblies/parts do not update.
Looking at the parameters dialog box after the rules have run, all user parameters have updated with the new values.If I run the first rule again the subassemblies/parts update correctly.
It appears that the rules that control the suppression states etc. of the subassemblies run using the initial values of the user parameters, i.e. the values as they were before the user input is obtained, rather than the new values.This is confusing me, as the code is structured as follows:
user_parameter_1 = InputBox("User Parameter 1", "Input", "xx")user_parameter_2 = InputBox("User Parameter 2", "Input", "xx")iLogicVb.RunRule("Rule 1")iLogicVb.RunRule("Rule 2")
View 2 Replies
View Related
Oct 6, 2011
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.
View 8 Replies
View Related
Oct 7, 2011
I am using Ilogic to control visibility of a subassembly in a subassembly of my main assembly. It works correctly inside of the subassembly just not from the Main Assembly. If I use IsActive instead it works but I can't use this because the dimensions in the associated drawings lose there attachment points using IsActive. I can change my assembly by removing the middle sub assembly but will require writing a lot more code.
View 8 Replies
View Related
Jun 17, 2013
I would like to make an External Rule that would make an iLogic Internal Rule (with the same code every time). I guess what I really need is a way to drive an Ilogic rule into every part that does not have the rule in the part already.
I know what you’re thinking and just using the External Rule doesn’t work for what I want to do. I need it to be an iLogic Internal Rule.
View 9 Replies
View Related
Oct 9, 2013
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?
View 3 Replies
View Related
Dec 5, 2012
I'm a contractor, I've created a really impressive form-driven assembly containing various iLogic rules. However, as i add more rules it is beginning to slow down (increase rule processing time). Should I suggest upgrading to 64-bit and increasing RAM?..could be costly with no increase in performance.
Processor: i7-2600
OS: 32-bit
RAM: 4.00GB
Inventor 2012
View 2 Replies
View Related
Aug 15, 2012
iLogic rule that will retrieve a part number(s) from an excel sheet. I work for a company that built vacuum trucks and I'm trying to make an . I am template where the user can select different lengths of shells to achieve the desire overall length. I have been able to achieve this using iLogic rules and forms and making the shell length parameter multi value.
But now I need to show predetermined SAP part numbers for the shells in BOM or part list. I all ready have an excel sheet with shell sizes with corresponding part numbers on file. I also thought about incorporating our custom CC parts/shells that already have the SAP part numbers set up as a custom iProperty but might be to complicated for a newbie iLogic user.
View 9 Replies
View Related
Oct 16, 2013
I created an iLogic rule that allows in a sheet metal part to the informations Length, widht and area of a flat pattern. This rule run and the iproerties are created (see attachment file).
Now, I will run this rule from an assembly file to create automatically, in all sheet metal components, theses iproperties.
Is it possible ? what must I change in this rule ?
View 1 Replies
View Related
Mar 19, 2012
Im quite new to customizing inventor and have been playing around with I-logic. I can get I-logic to enter values into existing ipt paramaters when run from a rule within the idw. I can also get I-logic to create a custom Paramater within the ipt using some copied API code, however I dont know my way around API at all yet. So...
I was wondering if it was possible to create a custom part parameter from an ilogic rule run in an idw with that ipt featured?
View 4 Replies
View Related
Oct 18, 2011
is it possible to rename the browser node on part level with an iLogic rule? I know that in the assembly environment is an Inventor OOTB functionality to rename the nodes to the filename, Part number or the default value.
Inventor Professional 2011
Windows 7 Enterprise 64bit
Dell Precision M4500
Intel(R) Core(TM) i7 CPU Q 820 @ 1.73GHz
8 GB RAM
View 2 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
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
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 7, 2014
Is there a way to invoke the iLogic Rule Editor and pass it an existing rule name or external rule for editing?
View 4 Replies
View Related
Dec 9, 2011
I am working for customer with a simple item with his iLogic design. He has created a simple form to modify his iProperties. To modify the current material, a multi-value parameter was created and the following rule as a local rule;
"MultiValue.List("MATLIST") = iProperties.Materials
iProperties.Material = MATLIST"
He is now trying to make this an external rule but gets the following error
Error in rule: Mat2, in document: Mat2.iLogicVb
iProperties.Material: is probably a bad material name.
The more info tab says:
System.ArgumentException: iProperties.Material: is probably a bad material name.
at iLogic.CadPropertiesInRule.SetDocMaterial(Document doc, String matName)
at LmiRuleScript.Main()
at Autodesk.iLogic.Exec.AppDomExec.ExecRuleInAssembly(Assembly assem)
at iLogic.RuleEvalContainer.ExecRuleEval(String execRule)
View 2 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
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