AutoCAD Inventor :: Launch External ILogic Rule With VBA?

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


ADVERTISEMENT

AutoCAD Inventor :: Run Ilogic Rule In Each Part From The Assembly Via External Rule

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

AutoCAD Inventor :: ILogic Design - Why Work With Local Rule But Errors On External Rule

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

AutoCAD Inventor :: Global Forms Button To Immediately Launch External Rule?

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

AutoCAD Inventor :: External ILogic Rule Error

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

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 View Related

AutoCAD Inventor :: How To Create External ILogic Rule

Jul 3, 2012

How to create external ilogic rule?

View 3 Replies View Related

AutoCAD Inventor :: Add External ILogic Rule Under Event Trigger Via API

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

AutoCAD Inventor :: Select Case In External Ilogic Rule

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

AutoCAD Inventor :: Get Environment Variable To Run External ILogic Rule

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

AutoCAD Inventor :: Change External ILogic Rule Destination

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

AutoCAD Inventor :: External ILogic Rule With User Parameters

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

AutoCAD Inventor :: Invoke ILogic Rule Editor And Pass It On Existing Rule Name?

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

AutoCAD Inventor :: ILogic / Run Assembly-level Rule From Component Rule?

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

AutoCAD Inventor :: Close ILogic Form With VBA Or ILogic Rule

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

AutoCAD Inventor :: Use Function In External Rule

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

AutoCAD Inventor :: Run External Rule In Occurrences?

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

AutoCAD Inventor :: Pass Array To External Rule?

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

AutoCAD Inventor :: How To Create A Rule In ILogic

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

AutoCAD Inventor :: ILogic - Save As PDF Rule

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

AutoCAD Inventor :: Running A Sub In ILogic Rule?

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

AutoCAD Inventor :: Delete ILogic Rule Using VBA?

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

AutoCAD Inventor :: How To Trigger An ILogic Rule

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

AutoCAD Inventor :: ILogic Drawing Rule

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

AutoCAD Inventor :: Adding ILogic Rule Using API

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

AutoCAD Inventor :: ILogic Rule Shrinkwrap Substitute

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

AutoCAD Inventor :: Add Keyboard Shortcut For ILogic Rule?

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

AutoCAD Inventor :: Getting Error When Creating ILogic Rule

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

AutoCAD Inventor :: Driving ILogic Rule Into A Part

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

AutoCAD Inventor :: Apply ILogic Rule To Several Files

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

AutoCAD Inventor :: ILogic Rule To Set Colour With RGB Values?

Jan 6, 2011

Is there a way to set the colour of a part using the RGB value?  (or perhaps the hexdecimal value?)I know I can set colours in iLogic by specifying an existing colour (ex... iProperties.PartColor = "Green")

I want to avoid adding the colour to Inventor as a custom colour, then referencing it in iLogic... The goal is, if a user specifies the finish on this part to be this colour, it will always be that RGB value (our standard in-house paint colour).  I don't want to add it to the Inventor 'colors' design data... when we upgrade to the next version of Inventor, it's one more item we have to remember to carry over!.

View 5 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved