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?
I want a ilogic rule syntax for following process:
I have one excel sheet it consists around 5 sheets for Plate, Flats, Rounds, etc. When i am run the rule then it will ask and do the following:
Ask the thickness value.It will search thickness value in “D:LINUS KOTTEstock numbers.xlsx” in sheet 1If thickness value found then fill the stock number in iproperty(project tab-stock number)
Here i am using different rules for plate, flat, round, etc.,
I was looking for some iLogic Code for Inventor 2013 that would cycle through all the parts in an assembly grabbing the quantity of each part and setting it equal to the custom property "Qty" of each part.
Having a little trouble creating the for each loop and setting reference to each part without referencing each part by specific name.
Is there a way to link any inventor file iproperties to a excel spreadsheet - so that the excel spreadsheet updates parametrically with any inventor iproperty changes.
I know that inventor parameters can be linked to excel, but what about i properties?
I'm importing custom iproperties from an excel document into inventor using the code I've written below. I've figured out how to bring up a dialog box to select the excel file I need, but I'm completely stumped when it comes to selecting the sheet within the file. As it is now, I'm specifying the sheet in the code itself (Str. C). My goal is after selecting the excel file from the dialog box, have ilogic list all the sheets within the excel file, then be able to select which sheet I need using a radio box, list box or some sort of prompted entry.
I'm looking for a way to export all iproperties, (from a selection or a directory), from windows browser, and CSV import into excel.
What I'm looking to do is, be able to select hundreds of files from the windows browser, either select the directory, (and it's sub-directories), or a selection of files, and extract their iproperties, and place the contents into excel similar to exporting contacts from outlook and importing them into excel.
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:
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??
I would like to copy and paste all iproperties from one part to another, without retyping it all.
What i was thinking about is:
1. Exporting all iproperties to .txt
2. Run a import .txt rule to iproperties.
Is it possible? If so, How could i accomplish a task such as this?
Privacy warning: Since I live in a country that has traded liberty for the illusion of security, all of your posts to me are being monitored and saved by the United States Government.
I am sure this is extremely simple to do but I am missing something. I am wanting to set the Description of a part in the Iproperties using values from the parameters. For instance, if the part has a length value of 10 and a width value of 5 I want the Description to say: 10 x 5 Floor Sheet
I cannot figure out how to extract the parameter values and place them into the iproperties. Here is what I have tried: iProperties.Value("Project", "Description")=" =<Length> x <Width> Floor Sheet"... This gives me the following result in my description: x Floor Sheet
I wish to set the properties of an assembly using i Logic. I have the values of the properties in a part that is in the assembly. I wish to pass those values from the part to the assemblies i properties. I tried using the following code, but it gives an error saying it can not find the document "MyAssy.iam"
My goal is to use basic ilogic to fill in some of the standard iproperty fields from parameters.I have so far managed to populate the description iproperty with one value from the parameters using this ilogic code;
where length is a user parameter.Want I would like to do is build on this to include more parameters such as material thickness, width and depth etc so the resulting iproperty description field would read something like
1.2mm SS 50x100 @3000
How do I go about writing the ilogic string to include multiple values and end up filling in the one description field?
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."
I'm trying to build a simple ilogic form to fill out iproperty infomation for parts we generate. Our company only uses a few of fields that are available. The problem is that the Physical tab is not available in the form editor. I would like to add this field to my form to be able to select the material for the part. The style/standard editor in our part template file holds all materials we use. Summary, Project, Status, and Custom are all available, why isn't Physical?
I have a form that is loading automatically in my part model. where i write the part number, description, project and custom titles.
my questions are:
1 - when i write the part number i would like then when i click apply it opens the save box with the same part number. 2 - it's possible to check-in the file during the saving and keeping the file checkout? 3 - i would like that some of the properties would be transfer to the drawing, like the description and the project (this two are from the part properties. 4 - transfer also for the drawing the custom titles to the custom i properties of the drawing as pre fill in.
I'm trying to put a little iLogic rule in my drawing template which triggers as soon as the drawing is opened. The rule asks the user whether the component he's making a drawing of needs to be painted or not. If it gets painted, the paint area (one side only or both sides) needs to be calculated. The result of this is then referenced by a text note in the title block.
I can do the radio boxes with the questions, as well as their If loops, but only when I'm in the model. Due to our, admittedly inefficient workflow, we never have time to specify "minor details" like paint area or spec during modelling, only when we get to drawing level. I'd like to put the iLogic rule inside the drawing template. I'm having trouble referencing the iProperties of the model from within the drawing's iLogic interface.
What I have so far is this rule, which I can run inside the model:
'set dummy variable equal to total areatotal_area = iProperties.Area'start radio box with questionsText1 = InputRadioBox("Will this component be painted?", "Yes", "No", Text1, Title := iProperties.Value("Project", "Description"))If Text1 = True ThenText2 = InputRadioBox("How many sides will be painted?", "Both sides", "One side only", Text2, Title := iProperties.Value("Project", "Description"))If Text2 = True TheniProperties.Value("Custom", "Paint Area") = total_areaElseIf Text2 = False TheniProperties.Value("Custom", "Paint Area") = total_area/2End IfElseIf Text1 = False TheniProperties.Value("Custom", "Paint Area") = 0End If
adding a line or two so that I can run the same rule, but from the drawing.
I'm trying to do this with iLogic, and i'm not getting anywhere. What I need, is to be able get to the iProperties of an associated model that is referenced into a drawing file. I want to make it easier to update the iProperties from the drawing file, without having to open the model file.
Factory Design Suite Ultimate 2012 AutoCAD 2012 | Inventor Professional 2012 | Vault Professional 2012
I am using ilogic in Inventor 2011 to update my iproperties when I save a .dwg file. I am having problems with some custom iProperties I have created that are of the type 'number' and are initially set to 0 (zero). After the iLogic rule has run and the user has entered a numeric value the type of the custom iproperty has changed to 'text'.
The ilogic code I am using is:
If iProperties.Value("Custom", "Nominal ID") = 0 Then iProperties.Value("Custom", "Nominal ID") = InputBox("Enter The Nominal ID (Enter 0 if no value is available)", "Nominal ID", 0) Custom_iProp_Nom_ID = iProperties.Value("Custom", "Nominal ID") End If
I am using Vault 2011 and would like to map this property to a numeric property so I can perform <= and >= searches.
Any way to use iLogic to create custom iProperties from the cells in an Excel spreadsheet (both text and numbers) for a .dwg template. The only thing even close has been a user who already knew how to do it and was having a different problem. I am using Inventor 2012 and Excel 2003 and have very little experience with VB. I currently have a family of assemblies, consisting of two parts linked to an Excel spreadsheet to control the various parameters for each variation of the assembly.
I need creating an iLogic rule that will:
Go to a specific tab (I have four different tabs/worksheets) in an Excel spreadsheet.
Make a specfic row of that worksheet the current row based on the part number used to generate the models of the assembly shown in a .dwg.
Use the contents of a cell in that row (text or numeric or a combination of both) to generate a custom iProperty for the .dwg template.
Use the custom iProperties to fill in the title block of the template.
I am trying to use an iLogic Excel link to define the hub and bushing dimensions for a wing pulley part file. I get an error: GoExcel: Could not match the column title: "Size". I've attached the part file and Excel file. The iLogic rule in the part file is called Hub_Bushing.
I am trying to create a new sheet in an existing excel file and can not figure out how to do it.
I am trying to export parts lists from multiple drawings to an exisitng excel spreadsheet and I'd like have each on their own sheet. I can do everything but create a sheet. How to do this in iLogic?
Inventor Pro 2013 (PDS Ultimate) Vault Pro 2013 Windows 7 64 Xeon 2.4 Ghz 12GB
I am currently using iparts/assemblies to model a resistor bank. We have dozens of different configurations and currently each time we need a new one its is re modeled from scratch.
I have created an assembly with all my relevant parts and controlled it through parameters to auto update when key values are changed.
What I would ideally like to do is to either link my two iparts to the iassembly though the excel sheets they use. Currently I have to added each variation to the parts first and then added the parameters to the assembly.
Would it be possible to have a master sheet were all control values are inputted and then each excel sheet for the different parts are linked to this?
As the excel sheets are saved in the temp file and are deleted once you have finished editing I have found it hard to do this so far. Can I change where they are saved? I tried save copy as which created the file but inventor did not link to it.
If this is not possible can I utilize iLogic to input the key values and then write them to a new row in the table. I have created a rule already to limit the number of elements and also the length of the by's (the space between each supporting rod). I have included a zip file with all my parts in it.
I want to export reference parameters to an excel table using i-Logic
I found the function GoExcel.CellValues("filename.xls", "Sheet1", "A2", "A10") = MultiValue.List("d0")
It looks like the syntax calls for the file location and name if the xls file is not open and if open is not supposed to be required.
I have entered it both ways and with and with out the target file open and with the function GoExcel.Open("pathFilename.xls","sheet1") and continue to get the error:
we couldn't find C:AbellAbell VaultWorkSpaceDEVELOPMENTAC100-0100MRLTEST Table.xls. Is it possible it was moved, renamed or deleted?
Also, I was expecting that to fill in the sheet cell's would be MultiValue.List("d0","d1","d2")
but the system give me an error that says
Error on Line 3 : Overload resolution failed because no accessible 'List' accepts this number of arguments.