AutoCAD Inventor :: ILogic Code To Trigger Rule In Child Component
Nov 20, 2013
I'm trying to create a rule in ilogic that would search through all child components (looking for both .ipt and .iam file types) looking for an ilogic rule within each child component with a particular name, and running that rule if it is found.
View 1 Replies
ADVERTISEMENT
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
Jun 26, 2012
I have an iPart which includes iLogic Rule. When I change iPart by table, iLogic Rules are not triggered.
In iLogic Utilities, there is a button "Rules Triggered by Events", If I use "Any Model Parameter Change", the update need long time, looks like Inventor is "No Response". I like the way "Material Change", but I need "part Number" change to trigger the rules. How can I do it? I tried other events as After Open, Before Save, etc, they are does not work.
View 9 Replies
View Related
Nov 3, 2011
Is there a way to set the event trigger of an ilogic file that's already inside of a document? I have code that can automatically create and populate new rules across my assembly parts, but it would be nice to set certain rules to fire every time that part gets saved.
If it can't be accomplished outright from the API, would it be possible to throw an OnEvent (save event in this case) inside of the iLogic code, to get the same results? URL...
View 8 Replies
View Related
Sep 22, 2011
Is it possible to place an external iLogic rule under a specific Event Trigger in a file via the API?
Inventor Professional 2014 64 Bit
Windows 7 Professional
NVIDIA Quadro FX 4600
Dual Intel Xeon E5540 CPUs
16GB DDR3 Ram
View 2 Replies
View Related
Nov 15, 2013
I'm making some ilogic code for my new drawing templates and I'd like run part of the code only when the rule is trigger by the "after open document" trigger. Is there a way to check which trigger started an iLogic rule or would I be stuck making a second rule which is only triggered by the "after open document" trigger?
View 2 Replies
View Related
Jul 11, 2013
How to get the API to add an iLogic Event Trigger but I cannot find the exact code on how to do it.
Is there a Simple way to add an Ilogic Rule (External or Internal) to an event trigger with a VBA Macro or iLogic Rule?
I would like to automate adding an iLogic rule to an Event Trigger when we update our old drawings.
The details of the Rule I am trying to call is as follows:
Rule Name = Save On Close Commands
Event = Before Close
We currently have Inventor 2013 and 2014. If it is not possible in 2013, is it possible in 2014?
get the Rule Added to the Event Trigger
View 9 Replies
View Related
Oct 3, 2013
I have a symbol that when I insert it into my dwg, I would like it to trigger a rule to create custom properties and fill out those properties. Ive already created a rule that is 100% working, I am just curious if its possible to have that rule triggered when I insert a specific symbol?
View 3 Replies
View Related
Jan 12, 2013
I have put together some ilogic code which is embedded within a part template, this auto populates the iproperties with the profiles length,width and thickness, and also automatically updates when any changes are made to the said profile When I hit save.
This works a treat when creating new parts, the problem arises when re-using old parts from previous jobs (Which is a regular occurrence),prior to when the code was created.
So I have to run the code as an external rule, but this has caught me,and a few other people out, as we have forgotten to run the rule after making a change to the part so the iproperties aren't automatically updated.
My question is, is there a snippet of code that I could add to my code, which embeds the the externally ran rule to the Ipt?
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 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
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
Oct 21, 2013
I love the new triad function when placing a new part in Inventor 2014: I am now searching to trigger the same function for a part that already has been placed.
Something like:
1) select component
2) press a button (triggers the macro I now want to write)
3) the triad pops up.
I searched true the Inventor Help & what's new in the API. But didn't find any reference to that command. So I am afraid that it is not yet in the API. Could I maybe emulate it by replacing a component with itself using the place component command + emulating a mouseclick at the same origin as the original piece?
So a piece of code like:
1) get filelocation of selected part
2) get the origin point (x,y,z) of the part
3) get the translation between the origin of the assembly and the part
4) delete the selected part
5) place the part using the place component command (so the triad has been triggered)
6) fill in the filelocation, origin & translation
7) give control back to the user so he can move the part using the triad.
View 3 Replies
View Related
Aug 19, 2013
how can I close an iLogic Form from either an iLogic Rule, or a VBA Rule (VBA is the Preferred method)?
View 5 Replies
View Related
Sep 18, 2013
I have a few assemblies setup that are controlled with a bunch of iLogic rules to modify all related parts when parameters are changed at the assembly level. I also have an opening message that pops up when the assembly model is opened (After Open Document trigger) to tell people how to use the parameters to make modifications.
Now, when this assembly model is placed into a drawing I am getting random pop ups of the opening message when placing views of additional models in the same drawing. If you open the drawing and try to place a base view of another model, Inventor stops to think for a minute or so before having the opening message of the iLogic controlled model pop up. The only event trigger for this message is "After Open Document" and the model is not being opened; why it is being triggered in the drawing and/or how to make it stop?
View 4 Replies
View Related
Mar 29, 2011
I am currently using a vb.net application to control inventor using the API code.The API code is used to delete/suppress unwanted occurances from parts and sub-assemblies, depending on what is selected in the external application. It then puts all the parts and sub-assemblies together into a final assembly.
Most of the parts contain iLogic rules, to control dimensions, and these have been set to trigger when the part file is opened.I have noticed that in my final assemblies some of the parts don't appear as they should, however if i close the final assembly and open the individual part it appears to be correct. If i then open the final assembly it looks fine.
I think this might be due to the iLogic rule being triggered when the part is opened.Is there any way to trigger the rules using the API code while the final assembly is open, instead of closing it down and opening all the component parts and sub-assemblies?Or should we set the rules to trigger on a parameter change?
View 6 Replies
View Related
Nov 29, 2012
I have a ipt which is controlled via an ilogic form,this form is opened by ilogic code, which in turn is triggered when the ipt is opened.
my problem is when the part is placed within an assembly the said form is triggered and the same happens when the assembly is reopened!.... I would prefer if the form opened only when the ipt is opened or edited....
Is there a snippet of code for this? Or is it even possible?
View 2 Replies
View Related
Dec 8, 2011
Is there any chance to define an event trigger which runs an iLogic rule when we check out an already open file? Problem is, that we need to synchronize iProperties on check out to clear "Approved by" when Vault State of Part is "under revision"
Vault Parameter "State" is mapped with iProperty "State".
So I want to run the following on check out:
Call ThisApplication.CommandManager.ControlDefinitions.Item("VaultPropertyWriteBack").Execute2(True)
View 3 Replies
View Related
Aug 10, 2012
Is it possible to have an iLogic rule trigger a standalone .exe?
View 4 Replies
View Related
Dec 10, 2012
it's possible when i copy my assembly with rule in who suppress or unsuppress my component, the parameter part name change same to my new part name in new assembly??? Now when i copy or when i use design assistance the name of my part dont change in rule?
View 9 Replies
View Related
Feb 10, 2012
I'm also trying to find a way to trigger an "Add-Ins" button that we have customized, and have it pop up on the closing of a form.
View 4 Replies
View Related
Feb 14, 2012
I'm trying to find a way to trigger an "Add-Ins" button that we have customized, and have it pop up on the closing of a form. If you know a way to program how to close a form through iLogic, or find a way to see if it's still open
I'm not sure that I actually want to access the button per say, but instead launch the dialog box. I'm not sure if this differs your answer in any way, but I searched the customization forum and found little information.
View 5 Replies
View Related
Sep 18, 2012
Using Ilogic 2010 I wish to trigger my rule on sheet change. Is this something that can be done? I am using it to zoom the drawing on sheet change.
View 1 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
May 9, 2013
I would like to know, whether is there is any ilogic option by which the Custom content center is triggered automatically to insert component in an assembly.
View 7 Replies
View Related
Apr 18, 2012
I want to create a rule that will warn the user when the plate thickness they are using is not standard. I have already created a multivalue parameter for plate thickness, which lists all standard steel plate thickness's and also allows for custom values.
I was hoping I could create a rule that would prompt a dialogue box warning when the user creates a custom value for plate thickness.
I know this can be done, but like I said, Im bloody useless with iLogic and find it hard to come across relevent examples and/or tutorials online.
View 2 Replies
View Related
Oct 24, 2012
I'm currently using this rule for easy PDF making
SaveLoc = "C:Temp"FileName = ThisDoc.FileName(False)Revnr = " rev_" & iProperties.Value("Project", "Revision Number")PDFnaam = SaveLoc & FileName & RevnrThisDoc.Document.SaveAs(PDFnaam & (".pdf") , True)MessageBox.Show("PDF is aangemaakt in C:Temp", "Document creation",MessageBoxButtons.OK,MessageBoxIcon.Information)
The problem with this is that i want to save without lineweight? is there anyway to do this with this code?
View 2 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
Jul 6, 2011
i have an iLogic rule in serveral files. Now this rule has to be deleted. This should be done with VBA. I can not find any function to delete a rule using VBA.
I found a function iLogicAuto.RunRuleDirect(rule), but not iLogicAuto.DeleteRule(rule) ...
I can not find any documentation for iLogic/VBA.
View 9 Replies
View Related
Jul 18, 2013
I have a rule setup for drawings. I need the rule to first determine if the there is a flat pattern view present. In other words, if there is no flat patter view, I want to the rule to stop.
I am very green to ilogic and VB. Running Inventor 2013.
View 2 Replies
View Related
Oct 5, 2011
I've caught glimpses of how to do this (For instance, this plugin (Inventor LinkParameters) [URL]...... when trying to actually find information on any documentation of how to get from point A to point B. I can't seem to find anything about ilogic automation / rule creation / ilogic in general, in the object browser at all.
I know code like this exists
Option ExplicitSub RuniLogicRule()Dim iLogicAuto As ObjectSet iLogicAuto = GetiLogicAddin(ThisApplication)If (iLogicAuto Is Nothing) Then Exit SubDim doc As DocumentSet doc = ThisApplication.ActiveDocumentDim ruleName As StringruleName = "Rule0"Dim rule As ObjectSet rule = iLogicAuto.GetRule(doc, "Rule0")If (rule Is Nothing) Then Call MsgBox("No rule named " & ruleName & " was found in the [code].......
(and even fixed the error it gave me due to the original code leaving something out) , but any info on the GetRule method is.
View 3 Replies
View Related