AutoCAD Inventor :: ILogic - Using External VB-File With Dynamic Name

Nov 2, 2011

I use Inventor 2010 with the iLogic Extension. My question is probably more VB.NEt-related than Inventor-related.

For my parts I usually have a main *.ipt that can receive input parameters and does some calculating with them. Then there are several 'slave' *.ipt that use the calculated parameters of the main.ipt. I would like to keep that structure. Using iLogic the slave.ipt's do some calculation, too, based on an external *.Vb-File. I load that file into the rules of the slave.ipts by using (for example) AddVbFile "External.Vb".

My question is if it is in any way possible to have it so that the name External.Vb can be dynamic? I tried using a new iLogic String parameter and storing the name of the external VB-File there so that I would have a Parameter Name = "External.Vb" and then use AddVbFile Name. But that sadly didn't work at all. My External.Vb is supposed to be unique for every copy of my assembly and having to write the correct name into the rule by hand is tedious.

View 2 Replies


ADVERTISEMENT

AutoCAD Inventor :: Call Form From External File In ILogic

Mar 26, 2012

I'm trying to find a way to call a form in a skeleton part file from within a parent assembly file.

I can open the form from the skeleton part, then leave it open and update values even while the skeleton part is inactive or even closed.  But I can't find out how to call it from the assembly file.  Is this possible?  I currently have to open the skeleton just to call up the form.

I can reference values or even add them in another form, but I am not allowed to change them in an assembly form, because they are (linked) reference parameters.

I have considered several workarounds, but this is how I really want it to work.  I'm just not that familiar with the code to know if there's a way around.  The code snippets only allow opening a form from the current document as far as I can see.  I don't really want a global from because I'm only changing parameters in one file, not all.

View 1 Replies View Related

AutoCAD Inventor :: External ILogic Rules And Templates?

Apr 1, 2012

I am trying to build a set of scripts (aka iLogic rules) into templates. So far, quite a common task. One extra requirement is that the scripts need to be updatable after parts have been instanciated from the template. That is, we do not want to update all of the ipt each time a new material option is added to the script. That means that external rules are the only way to go, right? This is the road I tried and it seems to work on my machine.

One extra requirement is that the whole project must be shared between several workstations. We went the Subversion road for that (for all the Vault comments). The scripts are distributed properly and in the same absolute location on the two test machines, all good (I checked the md5 on both side and they all match). The application options on all the machines are all set the same way (export the xml file, check it in the source control, import on all the machines restart). The iLogic search path is also updated, but manually this time, since it is not included in the application options export. It should all work perfectly right? Well, sort of....

I did create a tiny assembly from the templates. On my source machine, all looks good. The ilogic rules are both listed in the ilogic browser and the triggers are set when I instanciate from the template. This is the intended behavior. Now, I close inventor, copy the whole directory to a new machine, open inventor there and open the project. The rules do not appear anymore in the browser, but they are still listed in the trigger list (wtf?). The best part is that if I do not touch anything, stuff still works! The scripts are found and run properly!! Now, if I have to change the triggers or even find the rule in the browser to run it manually, well, bad-stuff-happens (tm).

All the files in question are indentical on both machines, the ilogic files, the ipt files, the application options export, all with the same hash. The ilogic search path is also set the same as are the absolute paths. It should work the same (tm).

Me sending a copy of the files is not likely to work though. Since the problem happens when you copy. I could try to "pack and go", but that would break reason #1 for doing that, which is keeping only one version of the script and adding materials at only one place for all the projects.

View 4 Replies View Related

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 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 :: ILogic External Rules Location

Jul 31, 2013

I have a dedicated folder for external rules on a network. In the Advanced ilogic configuration interface on my machine I added the path to this folder in the External rule directories.That seemed to work fine. I opened the ilogic tree activated the external tab and the external rules were available for selection.

Today I tried to do the same process however no rules were visible under the external tab. I had to select "add external rule" and navigate to the folder.I do not want my users to have to manually navigate to the folder. Is there a step i have missed in this process? I am using Inventor/ilogic 2009.

View 9 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 :: Non-Defined (Dynamic) Arrays In ILogic?

May 23, 2012

Is there a way to declare a non-bound array (dynamic array?) in iLogic?

There are examples of set bounds array:

MyDoubleValues = New Double(){1.2,2.2,3.3}

But doing something like:

Dim MyDoubleValues() As Double  ---Or---  MyDoubleValues = New Double()

Results in an error. On the other hand, the following totally works:

Dim MyDoubleValues(1) As Double

Which creates an array with a Ubound of 2

View 1 Replies View Related

AutoCAD Inventor :: ILogic Dynamic Parameter Update Off?

Aug 4, 2013

The rule iterates through an assembly looking for parameters. If it finds them it 'pushes' the value down from the top level Assembly into the sub-components.

It works well, but each component updates dynamically as the parameter value is changed. This looks a bit jerky and weird.Is there any way to write the script so the the updates all happen at once at the end?

' set a reference to the assembly component definintion.' This assumes an assembly document is open.Dim oAsmCompDef As AssemblyComponentDefinitionoAsmCompDef = ThisApplication.ActiveDocument.ComponentDefinition'Iterate through all of the occurrencesDim oOccurrence As ComponentOccurrenceFor Each oOccurrence In oAsmCompDef.Occurrences'check for and skip virtual components'(in case a virtual.
[code]...

View 7 Replies View Related

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 :: External Referencing Of Part File By Assembly File

Dec 13, 2013

Describe the external referencing of a part file by an assembly file? I keep getting confused between part file and an assembly file.

View 2 Replies View Related

AutoCAD Inventor :: ILogic Error Cannot Find Excel File After Saving File As Template

Dec 6, 2012

I'm linking an excel file to an .ipt file with iLogic code determining if the Material type is a certian value it will find the correct material thickness. These file work great when working on them thru Vault but when I "Save As Template" and create this file where our other template files are located (not Vault) this fuction does not work. I have realized that I had to place the a copy of the excel file in the same file folder as the template ipt, but even this does not fix the issue. 

I recieve this error:

Error in rule: Material, in document: Part6

'MWW Materials (Inventor).xlsx' could not be found. Check the spelling of the file name, and verify that the file location is correct.

If you are trying to open the file from your list of most recently used files, make sure that the file has not been renamed, moved, or deleted.

It seems completly countintutive that just saving the file as a template file would cause this not to work when all files that are required are located in the same file folder. Maybe I need a reference to the excel document within the iLogic code.

View 3 Replies View Related

AutoCAD Inventor :: Import IProperties Value From External Excel File

Dec 14, 2011

i have made a iLogic Module who, whit an external rules, import the iProperties value from an external exel file.The exel file is connected from SQL with the our managerial software.This in the external rule:

i = GoExcel.FindRow("Z:DISEGNI_INVENTORDescrizioni.xls", "Descrizioni", "Cod.Art.", "=", iProperties.Value ("Project", "Part Number"))iProperties.Value ("Project", "Description") = GoExcel.CurrentRowValue("Descr. Articolo Princ.")'iProperties.Value("Project", "Project")
[Code] .....

 It's work fine but i have same question. There is some string to refresh an iLogic Module? When i push the ruel button the rule add the custom value in iProperties, but there are disabled, i have close the module an reopen it for correct display the value of the iProperties.

this module work with single parts. Can I do an rule who do the same thing of my string but in one assembly, do this for every parts of assembly automaticly??

View 7 Replies View Related

AutoCAD Inventor :: ILogic Design Copy - Error Copying A File / Inventor Crashes

Nov 5, 2013

I'm trying to use iLogic Design Copy to copy an assembly and all its associated parts to another directory. The assembly contains content center parts. Inventor warns me that the destination file of one of the CC parts (and 18 others) will be overwritten. When I go ahead and copy anyway, the copying process stops at that specific CC part. The Design Copy Progress dialog box states there is an error copying that CC part. When I close the Design Copy Progress dialog box, Inventor crashes.

The error copying the CC part: I'm allowed to use content center parts in iLogic Design Copied stuff, right? I searched some related topics and I'm under the impression that Inventor keeps the CC parts in its own directory and shouldn't be trying to overwrite them.

View 3 Replies View Related

AutoCad :: Using Dynamic Block As External Reference

Dec 2, 2013

Is there a possibility to use "Dynamic Blocks" as an "External Reference" having the ability to use their features at the same time?

The thing is I have dwg1 and dwg2 files and in them I use "Dynamic Block1". Whenever I update "Dynamic Block1" in one of the dwg files I have to go to "design center" and update the "Dynamic Block1" in other dwg file.

View 9 Replies View Related

AutoCAD Inventor :: Use ILogic To Do File Save As?

Dec 3, 2010

I would like to use iLogic to do a File Save As and have the dialog box open in a specified folder.  I have tried the code below but it doesn't work. 
 
oFileDlg.InitialDirectory = "J:" & strFolder & (".dwg")
oFileDlg.ShowSave()

View 2 Replies View Related

AutoCAD Inventor :: ILogic File Naming

Dec 19, 2011

I am struggling with file naming.

We are implementing the vault and do not want to have to rename each file with design copy.

Any way where the filename of a part will change according to either assembly pararmenters or iProperties?

Another question I had would be involving a rule that would rename each ipt within an assembly by giving at a suffix/prefix once the assembly is completed.

View 3 Replies View Related

AutoCAD Inventor :: Open IDW File Using ILogic

Jul 19, 2013

Is there a way I can open an idw file using ilogic? I would like to put the rule into a form, so that I can click a button in the form to open the idw for my assembly.

Inventor 2014
HP Pavilion dv6t-6b00
Intel Core i7 2670QM
AMD Radeon HD 6490M
8gb RAM
Windows 7 64 bit
3Dconnexion SpaceExplorer

View 2 Replies View Related

AutoCAD Inventor :: ILogic Save File Crashes?

Sep 5, 2012

I seem to have my task accomplished, but Inventor crahes on me after it is done.

Here is how my iLogic works. 

' Deleting the suppressed parts from the assembly
Dim compDef as AssemblyComponentDefinition
compDef = ThisDoc.ComponentDefinition
Dim compOcc as ComponentDefinition
For Each compOcc in compDef
[Code] ........

Now as soon as the last line is executed, Inventor crashes.

But when I go to the save file part (C:MyPath), both the parts and assembly files are saved and if I open it, they work just fine.

I just can't get inventor to stop crashing.

View 7 Replies View Related

AutoCAD Inventor :: Using ILogic And Parameters In IDW File Text Box

Jun 7, 2011

I am trying to enter some material ordering info into an external spreadsheet, and have that info reflected in a text box within an idw drawing file.

My method is as follows:

Obtain a numerical value (250) from an external Excel spreadsheet (sample.xlsx).Assign this value to a parameter (abc) in an idw file (Materials Ordering.idw).Insert parameter abc I made into a text box within the same idw file.

I made a set_parameters rule, and the ilogic text of the above example is as follows:

'Open File and Scan line - Part = Impeller Casing Flange
i = GoExcel.FindRow("sample.xlsx", "Sheet1", "Part", "<=", "Impeller Casing Flange")
'abc = Material Width
abc = GoExcel.CurrentRowValue("Material Width")

I had no problems with the first two steps, after checking the parameters I could see that parameter abc is being updated successfully.

However, I am having trouble with the third step. In the format text dialog box, I can see a drop box for components, but I can't find a reference to the idw file in there.

My question is, am I going the wrong way about this? Should I have assigned the parameters to a component instead of the idw file?

View 5 Replies View Related

AutoCAD Inventor :: How To Close A Text File From Within An ILogic

Nov 3, 2012

I have an iLogic that runs to create parts and assemblies. These parts and sub-assemblies are for a range of library components which are either part(s) or assemblies or and assemblies composed of parts) and sub-assemblies as well. This iLogic is mostly done despite I have limited knowledge in this area. At the beginning it opens a text file (.txt)  by the command line:

ThisDoc.Launch("L:\_Nov 02Info and Input GuideLines.txt")that offers guidelines and instructions. 

I would like to how can I close (exit) this text file at a point within or end of the current iLogic because, it opens a several files of the same every time I run the iLogic otherwise.

View 3 Replies View Related

AutoCAD Inventor :: How To Delete All Parameters In A File With Ilogic

Aug 22, 2012

Working code ...... attaching file

Auto = iLogicVb.Automation
Dim iLogicAuto As Object
iLogicAuto = Auto
Dim oDoc As Document
oDoc = ThisApplication.ActiveDocument

[Code]...

'but now something more i wanna do is...... delete parameters

        If Not (param Is Nothing) Then
        
            For Each param In params
            i = MessageBox.Show("Checking for Parameter in File")
            i = MessageBox.Show("No.of Parameters exists are ="& param.count)
 
[Code]....

View 5 Replies View Related

AutoCAD Inventor :: ILogic - Browse To Select A File

Oct 9, 2012

Is it possible in iLogic to select a file in a dialog box or a browser ?

I need to replace the 3d model on a drawing. I have to ask the user to select the new file to use. How can I select the file using a dialog box or a browser ? The best should be a combobox with the list of opened files, and a button to browse on the disk, like when you create a view.

View 2 Replies View Related

AutoCAD Inventor :: ILogic Message Box At File Open?

Oct 2, 2013

My goal is to have a message box open as soon as an assembly file is opened so that other users will be warned/ notified of linked parameters.  My assumption is that an iLogic rule would be the best way to handle this.

I can create the message box, but when I looked through the iLogic snippets I didn't find any way to trigger the box at opening the file.

Inventor 2013 (SP2 Update 2), Windows 7 Professional (64-bit), SP1, Intel Xeon 3.07GHz CPU, 12GB RAM, NVIDIA Quadro 2000, Vault Basic 2013

View 3 Replies View Related







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