AutoCAD Inventor :: External ILogic Rule Is Not Working
Oct 5, 2013
Created in the template sheet metal rule. Why External ilogic rule is not working? User-valued parameter is created, sheet metal rule does not change.
name = ""For Each par In ThisDoc.Document.ComponentDefinition.Parameters.UserParameters If par.Name = "SMR" Then name = par.Name Exit For End IfNextIf name = "" Then Dim MyArrayList As New ArrayList For Each st In ThisDoc.Document.ComponentDefinition.SheetMetalStyles MyArrayList.add(st.Name) Next ThisDoc.Document.ComponentDefinition.Parameters.UserParameters.AddByValue("SMR", "", UnitsTypeEnum.kTextUnits) MultiValue.List("SMR") = MyArrayList Parameter("SMR") = SheetMetal.GetActiveStyle()End IfSheetMetal.SetActiveStyle(Parameter("SMR"))iLogicVb.UpdateWhenDone =TruePS:
View 2 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
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
Sep 26, 2011
Is there someway to launch an external iLogic rule with VBA?. I'd like to add a button to run the iLogic rule.
Inventor Pro 2013 (PDS Ultimate)
Vault Pro 2013
Windows 7 64
Xeon 2.4 Ghz 12GB
View 9 Replies
View Related
Oct 3, 2011
why this will not run as an external rule? It runs fine as an internal one.The error I get is object referance not set to an instance of an object?
'Updates rule when done
iLogicVb.UpdateWhenDone=True
'Creates input list dialog box & allows the user to choose the state
Product_Code=InputListBox("Enter Product Code", MultiValue.List("Product_Code"), Product_Code, Title :="Product Code", ListName :="Available Codes")
'Writes values to iProperty
iProperties.Value("Project", "Cost Center")=Product_Code
View 2 Replies
View Related
Jul 3, 2012
How to create external ilogic rule?
View 3 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
Sep 6, 2012
I've made an External rule in Ilogic that must read a parameter value (Thickness) to set a value in a property (StockNumber).
The value is not written to the property by Using 'Select Case', see code. There is no error or something like that. So what am I doing wrong?
Tested in an internal rule, where Select Case = <Thickness> instead of Parameter ("Thickness") and that works fine.....
Select Case Parameter("Thickness")Case 2iProperties.Value("Project", "Stock Number")="686001"Case 4iProperties.Value("Project", "Stock Number")="686002"Case 3iProperties.Value("Project", "Stock Number")="686003"End SelectiLogicVb.UpdateWhenDone = True
View 2 Replies
View Related
Sep 17, 2012
I tried to read an environment with iLogic and to combine it with an external rule name and to pass the whole path over to iLogicVB.RunExternalRule.
StrPath = Environment.GetEnvironmentVariable("ILOGIC_DIR")ilogic_rule = "IPT__01_New_Document_EXT.iLogicVb"rule = StrPath & ilogic_rule'MessageBox.Show(rule, "iLogic Rule to execute")iLogicVb.RunExternalRule(rule)
The message box shows the correct path, but I allways receive a error massage:
'GetEnvironmentVariable' is not a member of 'Inventor.Environment'
View 3 Replies
View Related
Jan 6, 2014
My company has recently switched from the H drive to the G drive. This has resulted in a lot of old files still referring to the H drive where the External Ilogic rules used to be. I'm wondering if there's any automatic way to change that? Uploading a pic showing the event triggers as they are now.
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
Aug 30, 2013
I need import all new params, rules and forms from a new template to older parts. I'm trying to use an external rule to create a new iproperties and import params from xml file but I can't assign these parameters with these iproperties.
I attach the code.
View 3 Replies
View Related
Aug 12, 2013
I have a rule in iLogic that I was testing as "Straight VB.Net" on various assemblies. It was working alright, but I was making some minor tweaks to eliminate errors. Now, all of a sudden, it is unresponsive. Completely. No errors, no "busy" symbol over my pointer, just nothing. I put in the line MsgBox("Begin") as the first line of the program to see if it was even getting into it, and still there is no response. I run the rule, and absolutely nothing happens. I tried writing it in iLogic instead, and that does make something happen. what might cause the VB.Net element of iLogic to stop working, and hopefully how to correct the problem as well?
View 2 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
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
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
Oct 28, 2013
I have an ilogic external rule which contains functions that I use from rules in my local assembly document. I'm trying to access the value of a parameter in the document from the external rule's function. Attached is a simple version of what I'm trying to do. If I manually run the external rule, it seems to work just fine, but when I call on the function from a seperate rule, its unable to get the parameter value. I get an error stating, "'Parameter' is not declared. It may be inaccessible due to its protection level."
'this is the external rule. if I run this manually, it works
Public Class test_functionsSub Mainmyresult = ""thisisatest(myresult)MsgBox(myresult)End SubFunction thisisatest(ByRef resultcreated As String)resultcreated = "it worked - " & Parameter("ParameterInDocument")End FunctionEnd Class
'this is my rule in the assembly document trying to use the external rule's function
AddVbFile "z_testrule.iLogicVb"Dim external_rule As New test_functionsmyresult = ""external_rule.thisisatest(myresult)MsgBox(myresult)
View 3 Replies
View Related
Jan 29, 2013
Is it possible to run an external rule in assembly occurrences?
You have RunRule in Component, But it does not seem to work with external rules
I referenced to occurrences and opened it using ThisApplication.Documents.Open(filepath, False)
Then i tried calling the same external rule. I thought it would run the external rule in the opened file,
but I ended up with a infinite loop on the main assembly.
Is there a way to run your rule in every occurrence with external?
View 2 Replies
View Related
Nov 26, 2013
Is there any way to pass an array from an internal rule to an external rule in iLogic?
View 2 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
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
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
Apr 4, 2013
I would like to instantly launch an External Rule just by clicking on a button in the Global Forms area of the iLogic browser. Is this possible, and if so, how would I do it?
Product Design Suite Ultimate 2014 | Vault Basic 2014 (SP1)
Dell Precision M6600 | Intel i7-2820QM - 16GB
nVIDIA Quadro 4000M | Windows 7/64 Pro
View 2 Replies
View Related
Sep 19, 2012
Is there any way to create a rule to create a substitute on my weldment files?
what I need is something like:
If this document file type is weldment then create shrinkwrap substitute, go to the file (substitute) read the custom iproperty "area" and write to this document custom iproperty "area for sand-blasting" activate LOD Master then delete substitute LOD.
The propose is for purchase department to know the area of the assembly (only the area of visible surfaces).
View 1 Replies
View Related
Oct 15, 2010
Is there any command/option to add a keyboard shortcut for ilogic rule?
Config :: Intel (R) Xeon (R) CPU E31245 @ 3.30 GHz, 16.0 GB, 64bit win7
Inventor 2013 and Vault Basic 2013
View 9 Replies
View Related
Oct 14, 2013
When i trying to create a new ilogic rule i get window with this error:
Spoiler (Highlight to read)System.InvalidCastException: Невозможно выполнить приведение [A]iLogic.CodeSnippets к [B]iLogic.CodeSnippets. Источником типа A является "Autodesk.iLogic, Version=17.0.13800.0, Culture=neutral, PublicKeyToken=null" в контексте "Default" в расположении "C:PROGRA~1AutodeskINVENT~1BinAutodesk.iLogic.dll". Источником типа B является "Autodesk.iLogic, Version=17.0.13800.0, Culture=neutral, PublicKeyToken=null" в контексте "LoadFrom" в расположении
[code]..........
View 4 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
May 26, 2010
I have an iLogic rule that I want to add to several files that are already existing. Is there an "easy" way to do this other than opening each and every file, creating a new rule, pasting in the code and then saving the file? If I had a macro that would create the rule I could run it with KwikBatch.
Using R2010/11
View 9 Replies
View Related