AutoCAD Inventor :: ILogic Rule To Populate Finished Material Size Based On Model Geometry Selection

May 23, 2012

I created the following user parameters:

-Thickness
-Width
-Length
-Dia

I then created a Custom iProperty which consisted of the following "formula":    Finished Material Size = <Thickness> x <Width> x <Length> Lg.

eg. of Finished Material Result :        Finished Material Size = 6 x 25 x 300 Lg.

The problem comes up when dealing with diametrical components as the above formula will only populate for square or rectangular parts. Which would work if I could use iLogic code to populate the Finished Material Size iProperty. I have tried but failed.

First I created another user parameter called "Geometry Type" which has a drop down selection of either "DIA" or "SQUARE, RECTANGULAR".I then created the following iLogic code to set 0 as the value for the "unused" size parameters

 If PART_GEOMETRY = "DIA" Then WIDTH = "0"If PART_GEOMETRY = "DIA" Then THICKNESS = "0"If PART_GEOMETRY = "SQUARE, RECTANGULAR" Then DIA = "0"
 The part I just can't get to work is as follows.

I need some iLogic code which will populate the "FINISHED MATERIAL SIZE" custom iproperty with one of the following based on my "GEOMETRY TYPE" selection. "DIA" would return the following to "FINISHED MATERIAL SIZE":      = Ø <Dia> x <Length> Lg.

While "SQUARE, RECTANGULAR" would return the following to "FINISHED MATERIAL SIZE":     = <THICKNESS> x <WIDTH> x <LENGTH> Lg.I tried the following code but it does not work:

If PART_GEOMETRY = "DIA" Then iProperties.Value("Custom", "FINISHED MATERIAL SIZE")= "Ø"DIA "x" LENGTH "Lg."If PART_GEOMETRY = "SQUARE, RECTANGULAR" Then iProperties.Value("Custom", "FINISHED MATERIAL SIZE")= THICKNESS "x" WIDTH "x" LENGTH "Lg."

View 2 Replies


ADVERTISEMENT

AutoCAD Inventor :: ILogic And ITrigger To Prompt Size And Material Changes?

Oct 23, 2013

I am interested in Learning about Ilogic and the Itrigger. I worked at a company where they had a prompt that would change, size, material, hole quantities etc. I am trying to recreate that for a cabinet but cannot seem to find a good tutorial, I know I need to write some sort of rule to do this but cannot find out specifcally how to do so.

View 2 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 :: 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 :: How To Tell When ILogic Has Finished Updating

Dec 7, 2011

I have an assembly with approx. 200 unique parts. Most of them derrived from a common skeleton-file. And some (you could say a lot) iLogic code.

Depending on how big changes one makes, it takes between 10 sec and 60 sec to update. Considering the complexity this is ok.

But the problem is that it is difficult for the user to tell if the update is complete. I have tried to have the last line in my driving rule to show a messagebox: "Updating done". But the messagebox fires to early, and pauses the remaining updating. Even if I call InventorVb.Rebuild and/or ThisDoc.Document.Rebuild in advance.

View 3 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 :: Populate IProperties From Excel Using ILogic

Jun 27, 2011

I am trying to use an iLogic rule to populate iProperties (some generic, some custom) from a part number spreadsheet (containing columns such as PART NUMBER, DESCRIPTION, FINISH etc) and the rule keeps throwing up the following error 'Conversion from string "" to type 'Double' is not valid.'

Here’s part of the code (would be extended for the required custom iproperties but I’m assuming the same principle is ok)
 
StartRule:
'read excel file
GoExcel.Open("C:DESIGNDocumentsEXCEL FILESPART NUMBERS", "PARTS")
'index row 3 through 10000
For rowPN = 3 To 10000
'find first empty cell in PART NUMBER column (Column A)
 If (GoExcel.CellValue("A" & rowPN) = "") Then
[code]...
 
Changing the format of the excel data (number or text) has no effect. Is manipulation of the format required so that Inventor can read text and numbers to iProperties in this way?

View 5 Replies View Related

AutoCAD Inventor :: ILogic To Populate Iproperty From Multi Value Parameter

Nov 3, 2011

I am struggling to find the right ilogic to extract the state of a multi-value text parameter and use it to populate a single i property.

View 1 Replies View Related

AutoCAD Inventor :: Automated Assembly Based On Work Geometry

Aug 13, 2013

I'm trying to setup an assembly based on a complex 3D sketch.  In simplest terms, if I have a sketch for the perimeter of a house, I'd like to add instances of a 2x4.ipt at specified locations automatically.  That's not necessarily every 16", but rather wherever I put a specific geometry.  I'm imagining two work axis or sketch lines, one along the perimeter to determine the location of the 2x4 and one perpendicular to determine the direction the 2x4 points. 

In actuality my sketch won't be a rectangle, but rather a complex 3D spline, that's why I'm hoping to get some sort of automated process.  And the current design involves somewhere on the order of 1500-1800 2x4s.  Making the sketches and geometry will be nightmarish enough, I'd prefer to be able to breeze through the assembly portion.

View 3 Replies View Related

AutoCAD Inventor :: Any Feature Is Not Recognized As Part Geometry Change Because rule Isn't Triggered

Dec 6, 2013

In our drawing file we expose the mass of the part. So I have set the 'Update physical properties on save' in the 'Application Options'. This works fine when you save your file before switching to the drawing file. If you forget to save and go to the drawing file the mass is showed as: N/A.

Therefore I have created a rule which updates the mass of the part. This rule is activated with the 'Part Geometry Change' event trigger. This is done to update the mass in the drawing file even when the partfile is not saved. This works fine. If I make any changes to the model the mass is updated correct, EXCEPT for deleting features. When I delete a feature and switch to the drawing file the mass is shown as N/A again. So apparently deletion of any feature is not recognized as a 'Part Geometry Change' because the rule isn't triggered.

View 7 Replies View Related

AutoCAD Inventor :: Sheet Metal Rule Material Disappears

Jul 24, 2012

I'm trying to associate a material with a sheet metal rule, however, in the Styles Editor, it won't let me save a material to any sheet metal rule other than Default. If I set a material, then switch to a different rule, then switch back, it sets the material to blank.

View 6 Replies View Related

AutoCAD Inventor :: Material Referenced In The Sheet Metal Rule Could Not Be Located

Oct 5, 2012

I open my assembly and get this prompt."The material referenced in the sheet metal rule could not be located....."

There are several sheet metal parts in this assembly, so I am not really sure which part it is talking about.  Would be good if it listed the part number so I could correct it. So I am off to find the one that is causing the trouble.  I close my iam and open the first sheet metal part, no dialog box, so I assume its not this one. Close it, and open the next one.  No dialog box, so I open the next one..... I continue this until I have opened all the sheet metal parts in this assembly and NONE show me the dialog again.... huh!!  That was yesterday. 

I come in this morning, start Inventor and open one of the sheet metal parts from yesterday and immediately get the dialog again.  The problem is that this dialog will only appear ONCE per Inventor session.

Once I nailed down the offending part, I then tried to find the offending material. I dont really know what this dialog is telling me cause the materials for the rules are stored locally in the part.  Why is it even trying to reference a material in the library?

Windows 7 x64 -12 GB Ram
Intel i7-930 @ 2.80ghz
nVidia GTS 250 -1GB (Driver 301.42)
INV Pro R2013, Update2
Vault 2013

View 3 Replies View Related

AutoCAD Inventor :: How To Change Sheet Metal Rule For Changing Material

Aug 4, 2013

 I want to change the material of a sheet metal part using inventor api.I tried something like code
 
Dim partDoc As PartDocument partDoc = inventorApp.Documents.Open(FilePath & filename, False) If partDoc.SubType = "{9C464203-9BAE-11D3-8BAD-0060B0CE6BB4}" Then Dim smDef As SheetMetalComponentDefinition smDef = partDoc.ComponentDefinition Dim style As SheetMetalStyle style = smDef.SheetMetalStyles.Item("sheetMetalRule")

 But I can't get the code for material change.

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

Photoshop :: New File Based On Size Of Current Selection?

Mar 29, 2012

Is there a way to make a New file based on the current selection?

View 2 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 :: 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 :: 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

AutoCAD Inventor :: ILogic Edit Rule Error?

Oct 4, 2012

I got this error popping up every time I open an iLogic edit rule and all my snippets are gone. Now it has started doing it on a different computer in our office. The error dialog box is in the image below. T

View 4 Replies View Related







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