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
ADVERTISEMENT
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
Apr 3, 2012
I want to import the parameters from the .ipt file into the .iam file using a rule from iLogic (unless there is another way to do it?)
I pinched the code from the example hand rail iLogic part that comes with inventor and tweaked it to suit. After inputting the code shown in the image, when I click OK I get a 'fatal error' of some sort.
View 6 Replies
View Related
Oct 9, 2013
I'm having some difficulties with iLogic and reference parameters.
I have made a tube with a weird shape and I want to measure the longest length. So I have to cut the tube in a certain angle in relation with the center to measure the length.
The problem is that this angle is really hard to calculate.
So I tried making a rule where I can make my angle shift x degree and then measure the longest length. If the measurement is larger the previous measurement the angle will shift x degree again until the measurement is smaller than the previous.
So I made my starting angle 0 degree, I know this is for a fact not the longest length. And then I tried this rule. (before making a While rule).
And I noticed that on screen the measurement changes. But the reference - parameter stays the same. So it gives me the measurement on the starting angle & after rotating it again gives me the starting angle.
How can I get the parameter to update itself in between?
Dim measurement_length As DoubleDim measurement_length2 As DoubleMessageBox.Show("Start angle ", "My iLogic Dialog", MessageBoxButtons.OK, MessageBoxIcon.Asterisk, MessageBoxDefaultButton.Button1)angle_measurement_spec = 0RuleParametersOutput()InventorVb.DocumentUpdate()measurement_length = [code].....
View 1 Replies
View Related
Feb 20, 2013
I would like to save parameters marked as Key to an XML-file (from an Inventor addin, VB.NET):
Dim addIn As ApplicationAddIn = m_inventorApp.ApplicationAddIns.ItemById("{3bdd8d79-2179-4b11-8a5a-257b1c0263ac}") 'iLogic addin addIn.Activate() Dim iLogicAddin As Object = addIn.Automation iLogicAddin.ParametersXmlSave(invDoc, "c: emp ext.xml", iLogicAddin.XmlSaveOption.KeysOnly)
This doesn't run: "Public member 'XmlSaveOption' on type 'iLogicAutomation' not found."
The documentation says:
Autodesk.iLogic.Interfaces.IiLogicAutomation.ParametersXmlSave(Inventor.Document,System.String,Autodesk.iLogic.Interfaces.XmlSaveOption)
What is the correct syntax to get the XmlSaveOption?
View 1 Replies
View Related
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
Mar 8, 2012
In the attached file there is a User Parameter, "Antal_ledekasser". Inventor has calculated its value to 2.
If you do the math by hand then you see the value should be 5.
Rebuild doesn't force recalculation.
There is an iLogic rule in the part, but this also fails to force recalculation:
iLogicVb.UpdateWhenDone=True
InventorVb.DocumentUpdate()
ThisDoc.Document.Rebuild2
ThisDoc.Document.Update2
Manual work around is to change the formula, then the value is recalculated.
iLogic work around is to change a parameter-value - and run the rule TWICE.
Question: How do I force a real rebuild, that actually wil recalculate parameter-values the first time I run the iLogic rule?
Background: The attached file is a little subset of the skeleton in a large assembly that is controlled by iLogic. The rules are placed in the topassembly, and writes vaules to the skeleton-file.
After writing values to skeleton-parameters I try to force them through with this iLogic
RuleParametersOutput()
InventorVb.DocumentUpdate()
iLogicVb.RunRule("Skeleton", "Update")
Later in the process I use calculated values to decide which components should be active. But my logic fails because my decisions are made on faulty values.
I did manage to get the updating work in 2011. But after migrating to 2012, it seems impossible to have it update correct. The user has to run rules several times, and doing manually updates to get a correct model.
View 2 Replies
View Related
May 21, 2013
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.
See below
GoExcel.Open("C:AbellAbell VaultWorkSpaceDEVELOPMENTAC100-0100MRLTEST Table.xls", "AC-100-0101003-TEST")GoExcel.CellValues("C:AbellAbell VaultWorkSpaceDEVELOPMENTAC100-0100MRLTEST Table.xls", "AC-100-0101003-TEST", "A2", "A10") = MultiValue.List("d194_A")GoExcel.Save
View 8 Replies
View Related
Jul 17, 2013
iLogic code question concerning how Place iLogic Component and retain the ability to push parameters from the subassemblies to the parts after being renamed.
I have ASSEMBLY.iam containing:
SUBASSEMBLY-01:1.iam
SUBASSEMBLY-02:1.iam
and sometimes SUBASSEMBLY-02:2.iam
each SUBASSEMBLY.iam contains PART1.ipt and PART2.ipt which have variable LENGTH and WIDTH. LENGTH and WIDTH are entered manually at the SUBASSEMBLY.iam and are infinitely variable.
To transfer the parameters I'm using iLogic code in the SUBASSEMBLY:
Parameter("PART1.ipt", "LENGTH")=LENGTHParameter("PART1.ipt", "WIDTH")=WIDTHParameter("PART2.ipt", "LENGTH")=LENGTHParameter("PART2.ipt", "WIDTH")=WIDTH
Issue 1: When I place the SUBASSEMBLY as an iLogic Component, the parts are renamed to PART1-01.ipt which renders my Parameter transfer useless. What am I missing on writing this code so it can find the new part name?
Issue 2: I like the automatic renaming that happens with Place iLogic Component. Is there a better way to handle this automatically through Place Component -> Save & Replace?
Inventor 2013
View 1 Replies
View Related
Sep 11, 2013
I am looking for information on the option parameters, any documentation?
I found some code to query what parameters there are (Rule: GetTranslatorOptions), just not sure what the enumerations are for some.
Specifically: ExportUnits, Resolution
Using Rule:ExportSTL
I have changed the Export Units from 1 to 4 and do not see any change to the STL ASCII output.. not sure what this parameter does... Expected it to be an enumeration of the drop-down box that you see during "manual" exporting.
View 1 Replies
View Related
Aug 14, 2013
I have this little iLogic snippet that writes out the name and value of all parameters in active document.
doc = ThisDoc.Documentparams = doc.ComponentDefinition.Parametersnames = New List(Of String)values = New List(Of String)For Each param In paramsIf Len(param.Name)>4 Thennames.Add(param.Name)values.Add(param.Value.ToString)ElseEnd IfNextMultiValue.List("ParamsList") = namesMultiValue.List("ParamsValues") = valuesGoExcel.CellValues("COVER.DEFAULT.PARAMS.xlsx", "Sheet1", "A2", "A400") = MultiValue.List("ParamsList")GoExcel.CellValues("COVER.DEFAULT.PARAMS.xlsx", "Sheet1", "B2", "B400") = MultiValue.List("ParamsValues")GoExcel.SaveGoExcel.Close
The problem is it ignores the parameter's units and assumes cm for length and rad for angular. I need another nested IF - Then that says:
IF param.Values.'UnitType' is "in" THEN
param.Value = param.Value/2.54
Else If param.Values.'UnitType' is "deg" THEN
param.Value = param.Value*360/2/3.14159
End If
I just do not know the syntax or proper method.
View 1 Replies
View Related
Dec 26, 2013
Is there a way to work with parameters on a suppressed assembly using iLogic.Everything works fine, but when I suppressed a part ilogic rule give me an error: Parameter: The component named "xxxxx:1" was not found.
View 1 Replies
View Related
Jun 12, 2013
Is there a standard command or command sequence that allows for the changing of a parameter, say length, of a component from within an assembly. I'm looking to compile a code that allows for a template to be created, then that template will do changes based on text box input and then save out the modified parts with new part numbers.
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 7, 2013
We have an idw package we use for Quality control. This idw has more than one sheet. Each sheet has a part placed on the sheet with dims.( DWF attached). Next we open DA inside of the file and run a report. (exported txt attached). I am trying to use ilogic the make the same report with a iLogic browser button pick. I have 2 codes (code examples on attached jpg) that i need to make into 1, or whatever works.
1st code
Dim oDoc As DrawingDocumentoDoc = ThisApplication.ActiveDocument Dim oSubDoc As Inventor.Document Dim oPropSets As PropertySets Dim oPropSet As PropertySetDim oPartNumiProp As Inventor.Property For Each oSubDoc In oDoc.AllReferencedDocumentsIf oSubDoc.documenttype.
[code]....
2nd code
fileheader = "QAF Parts for Planning "fileheader1 = ThisDoc.PathAndFileName(True) 'first line header of txt filedescription = "Components to use for Nesting" 'use this variable in the body of the txtdelimiter = "," 'character to separate the names and values on each lineoWrite = System.IO. File. Create Text (ThisDoc.PathAndFileName(False) & ".txt")oWrite.WriteLine(fileheader) 'include the fileheader on the first.
[code]....
View 4 Replies
View Related
Aug 23, 2011
I would like to be able to use iLogic to get the value of the Comment field of a model's parameters. I have some text there that I would like to display in a sketched symbol. The attached image illustrates what I am seeking.
View 2 Replies
View Related
May 7, 2012
So far I can discover parameters and ilogic aren't possible in the definition of a drawing border.
How can fold lines be created in a border that can be used for multiple scales?
View 1 Replies
View Related
Oct 28, 2013
I have two user parameters saved in a part template that are tied to the part volume and an overall estimated part weight. The user parameter Pc_Volume is the volume in cubic feet and calculated by pulling the part mass (in cubic inches) and converting to cubic feet via ilogic rule. This is then automatically run via event triggers before a file is saved and if the part geometry has changed to keep the volume up to date. These are exported because they get pulled into iproperties of our drawing files as well as used to create a parts lists showing the volumes and weights.
I have the property formats of the user parameters set to Number and to unitless and the unit display turned off so it does not show on the parts list, with a precision of 0.000 for Pc_Volume. The Pc_Weight is set the same way however with a precision rounded to the nearest whole number.
These are created this way so when we use the part file as the template when we select "Make Components" to separate our parts and tie them to an assembly all the files are then updated and the information saved for exporting.
The problem is, the Pc_Volume always comes in rounded to a whole number. The Pc_Weight Does as well, but that doesn't bother me since we want it to do that anyway. If I would go into the part file after it's created, double check the precision and then re-run the rule the volume will show up with the correct precision in the exported parameters. I don't want to have to open each partfile however to get this to update.
Attached are images of the parameters, ilogic rule, and exported results.
View 2 Replies
View Related
Aug 31, 2011
I want to change 'mutil value select" to "custom value input" in ilogic user parameters. something like this:
if condition A then
multivalue.setlist("length", 1,2,3,4,5)
else
(users can enter any value they want, how can i remove the list first and set it to custom value input?)
View 2 Replies
View Related
Jan 9, 2013
Is there any way of exporting text parameters from an assembly to individual parts without using i Logic? I am also unable to import text parameters to a . I am from an excel file.
We are currently using ilogic to change part text parameters from the assembly but it is a sticking plaster at best, as the rules need to be rewritten when parts are added and deleted from the assembly. We are trying to update our etched job number (which in many cases contains letters) from a single point on the assembly model which should populate all part files, and make it robust for all our CAD users, who do not use iLogic in their day to day duties.
If this is not possible (exporting text parameters the same way numerical parameters are handled) is there any plans of getting this included in upcoming versions?
View 1 Replies
View Related
Jul 18, 2005
Is there a way to create user parameter as TEXT Paramters does not accept the text paramaters . we always have tor create parameters as numbers.
View 9 Replies
View Related
Nov 25, 2010
I have some similar flat sheet parts defined as an ipart. I want to cut a text string, specific to that part variation, out of each part with a stencil font. I was hoping to use the new 2011 text parameter and some geometry text to cut out some different text from each part by either putting the text in the iPart table or using a multi-value text parameter and the part id (0,1,2,3 etc). However, geometry text doesn't seem to allow text parameters (which is odd as its the most natural use for a text parameter IMHO).
For extra bonus points: While trying 101 variations to accomplish this I found btw that iLogic rules don't seem to work for iParts (i.e. they're greyed out). Is this right?
Also, geometry text doesn't work for splines, ellipses etc?
View 9 Replies
View Related
Jun 9, 2010
I know that in Inventor 2011 you can add text to your IDW and insert numeric parameters from Parts in an Assembly, BUT what I would like to do is insert parameters that contain text. Ideally I would to just pull the parameters from from the Assembly and place them as Text in the IDW.
I can pull the parameters from the Assembly into the IDW using iLogic, but I still can't insert them in text.
View 5 Replies
View Related
Nov 27, 2012
I have several name plates which are embossed, and only the description changes from job to job, but find it a nuisance having to go into the part,edit sketch then edit text! each time I want to change the description .
I was initially going to get round this by creating a form and linking it to the text parameter! But for some reason it won't take in the text parameter I created and will only find and take in numerical parameters?
Is there any way around this? I know it is possible in inventor 2013. I am currently working with Inventor professional 2012.
View 2 Replies
View Related
Apr 15, 2013
I'm creating an iPart for Content Centre authoring. I have an Emboss feature that I would like to cut 2 text values into a face. I'm having trouble figuring out how to acheive this through the iPart table. I started by making 2 User Parameters multi-value but came to an abrupt halt as I can't see them in the Table. And I suspect that this approach won't work anyway.
Windows 7 x64 -64 GB Ram, Intel Xeon E5-1620 @ 3.6 GHz
ATI FirePro V7800 2 GB, 180 GB SSD & 1 TB HDD, Inv R2013 PDS Premium SP2 Update 3 (Build 200), Vault 2013 Workgroup Update 2 (Build 17.2.9.0)
View 4 Replies
View Related
Feb 19, 2012
I'm trying to finally utilize iLogic and all of its functionality (after using the basic features of inventor for the past 3 or so years) and I was wondering if there was a way to use iLogic (or some other feature for inventor) to resize text in a title block field of an IDW based on the length of the text entered (i.e. if the part's name was "Cam Retainer" the text height would be .12, but if its part name was "Spacer Cam Retainer Bushing" the text height would shrink down to .085 or something) so that it would still fit nicely into the text block?
View 3 Replies
View Related
Oct 5, 2012
I have created an assembly containing several parts. I want to export several text parameters of the assembly and parts into the i properties of the corresponding idw so that I can use them in a text block.
View 4 Replies
View Related
Jun 26, 2012
I am running into some trouble with user parameters that have been inserted into a dimension's "text box". I sometimes hide the dimension itself and insert these parameters so that iLogic can manipulate the upper & lower tolerance limits for a dimension.
The problem seems to arrise anytime one of the dimension's arrows becomes detached from the drawing (and perhaps for other reasons, too, although this is the only clear cause so far). I can reattach the arrow and the dimension seems healthy again, but if I go into the text editor, I notice that the link to any parameters that I've inserted has been lost. They appear as they were last set, but will not update if the parameters themselves change.
Is there a better workaround for this, or can we expect a solution in IV2013? I've invested close to a year's worth of work expecting this method to perform properly, and it will be a letdown if there's no solution.
View 1 Replies
View Related
Mar 14, 2012
Currently, when adding a parameter in the text dialog box, the parameter displays as a decimal (0.50). Is there a way to change this to display as fractional (1/2).
View 3 Replies
View Related
Oct 6, 2012
But I was wondering if it is possible to contol the insertion of dynamic blocks and it user definerable parameters from a excel-text file.
I am surveying a section of pipework and I need to display the brackets that are supporting the pipes. As there are numerous pipes on top of each other I have decided to show the brackets in plan and isometric view.
I think I have made the dynamic block ok and have numerous stretch/move and scale parameters working correctly.
But the only way that I can see of chaging these parameters at the momment is by manually typing them in the properties tool pallete for each individual block.
So I was thinking that if I can store the correct values that I need for each parameter in the dynamic block on our data logger along with the correct E,N,Z insertion point is it possible for this file to change the parameters in the dynamic block for example, If I have the correct insertion point stored and then have 10 parameters stored with that point for simplicity I store as A=5.00,B=8.00,C=0.100 etc and these correspond with the parameters in the dynamic block will this file be able to alter the dynamic block as the values in the excel/Text file are displayed.
View 2 Replies
View Related
Nov 21, 2012
I am trying to export a user parameter that is a text string to a custom I property. I am able to export other parameters to custom properties that are numarical values. I export check box is missing on the text user parameter.
Is there a way to acomplish this with I-logic?
View 5 Replies
View Related