AutoCAD Inventor :: ILogic Text Resizing Based On Length Of Text
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
ADVERTISEMENT
May 2, 2011
My firm worked on a project recently with a sheet numbering system that created long sheet numbers, ie, MH-101-R1. Since the sheet numbers were so long, they no longer fit in our normal sheet/detail/drawing label blocks. (See attached DWG for an example.)
We are looking to create either a dynamic block or some kind of block that will automatically stretch with the text length.
View 4 Replies
View Related
Jan 8, 2013
Is it possible to change the length of a line based on the length of an attribute?
I'd like to make the line a MINIMUM length of X" (I haven't decided how long yet--but know I'll need a minimum). But then after the user fills in the attribute, I'd like the length of the line to change to the length of the attribute plus a small amount (again, I haven't decided yet how much extra).
View 3 Replies
View Related
Jan 24, 2012
I am creating a block with attributes for a standard job. I have (4) total attributes in this block (for example: panel type, qty, length in imperial, length in mertic)
I would like my length in metric attribute to automatically populate based on the input from length in imperial.
Is this possible?
View 1 Replies
View Related
Mar 15, 2013
I need to change the length of geometry by a text parameter.How to do this?
I tried this:
If widthselection="420" Then
Parameter(d11)=725mm
Parameter(width)=420mm
ElseIf widthselection="620" Then
Parameter(d11)=1075mm
Parameter(width)=620mm
[code]....
View 2 Replies
View Related
Oct 1, 2013
Im linking a prompted entry in a sketch symbol to a selection from the user in an array. The code works perfectly.
The array displays the number of sheets there are in the document, the user selects the correct one & the sheet number is displayed in the prompted entry. I need to add "SHT" before the number though in the code but I cant get it to work.
I dont want to add a text line into the symbol saying "sht"
Dim oApp As Application: oApp = ThisApplication
Dim oDoc As DrawingDocument: oDoc = oApp.ActiveDocument
Dim oSheet As Sheet: oSheet = oDoc.ActiveSheet
'This uses a sketch symbol with the name "'View On' View Label"
Dim oSymDef As SketchedSymbolDefinition: oSymDef = oDoc.SketchedSymbolDefinitions.Item("'View On' View Label")
'This is the selected view
Dim oView As DrawingView: oView = ThisApplication.CommandManager.Pick(SelectionFilterEnum.kDrawingViewFilter,"Select View To Place Symbol:")
'This takes the label items of the selected view
'And adds it To an array that will link To the prompted entry
Dim sPromptStrings(2) As String
sPromptStrings(0) = oView.Name
sPromptStrings(1) = oView.ScaleString
oDoc = ThisApplication.ActiveDocument
Dim sSheet As Sheet
'create sheet number list
Dim oSheetList As New ArrayList
i = 0
s = "-"
For Each sSheet In oDoc.Sheets
i = i +1
oSheetList.add(i)
Next
oSheetList.add(s)
'get user input
mySheet = (InputListBox("View taken form sheet number.", oSheetList, oSheetList(0), "Sheet Number Ref.", "Sheet Numbers"))
sPromptStrings(2) = mySheet
'This is the position for the sketched symbol under the selected view'
Dim oPosition As Point2d: oPosition = oView.Center
oPosition.y = oPosition.y - (oView.Height / 2 + 2.5)
'This inserts the sketched symbol and fills in the prompted entry.
Dim oSymbol As SketchedSymbol: oSymbol = oSheet.SketchedSymbols.Add(oSymDef, oPosition, , ,sPromptStrings)
View 2 Replies
View Related
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
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
Jun 19, 2013
I have this grid template i use for my layouts I would like to edit text from my form.. How to do???
In attached part I have it to work with the number but not with letters
View 1 Replies
View Related
Aug 7, 2012
I am trying to suppress features or Extrusions if the extrusions are outside of the Raduis of a contruction circle Called the OTL. I have added a model to look at. So lets say I have holes enougth for a 40" dia but I want only hole today for a 20" dia how do i suppress the holes on that radius. Sketch 10 is where the OTL contruction line is and its a radius so its always moving as I go from center out.
View 9 Replies
View Related
May 30, 2013
what code I would use in an assembly if I want to enable and make visible certain parts depending on the positional rep I am using.
Basically I am having trouble reading the pos rep into an iLogic code
View 5 Replies
View Related
Nov 4, 2011
I am trying to convert a standard iPart to an iLogic based part. The part has some text driven, cells..PatNumber, Description..ect..But when I try to referance those cells the iLogic code either does nothing or errors out.
Basicly i have a bunch of flange rings with have several variables theat need to change as the part number changes, sounds simple right?I have rewritten the code so many times...I have gone from hunt and pecking to typing 300 words a min...well maybe not.
About 75-80% of all our parts are identical in shape but just get smaller or larger depending on what size portable auger it goes on.I have been trying to get the part to changed based on "PartNumber" but it has text in the value.
View 7 Replies
View Related
May 29, 2012
Is there a way to widen the InputlistBox dialog box used in iLogic without having to resort to a form instead? I am unable to resize it manually when it appears and don't know of any arguements in the iLogic function that can change the width.
I have attached an image which illustrates what I'm trying to achieve. See "Listbox.gif"
View 2 Replies
View Related
Jul 21, 2013
I amrying to create embedding of a text entered through dialog box. The sketch regenerates fine but the Emboss doesn't. Cannot figure it out, tried a lot of different approaches...the text has to be configured this way - need to control it's height.
View 2 Replies
View Related
May 16, 2012
I have created a Sketched Symbol "Replace by" with a prompt text where I must write the new drawing number.
I'm trying to use Ilogic function to copy the Prompted text into a custom drawing iProperty.
Here is the code :
Format:HTML Format Version:1.0 StartHTML: 165 EndHTML: 3471 StartFragment: 314 EndFragment: 3439 StartSelection: 314 EndSelection: 314
SyntaxEditor Code Snippet
SubMain()oInvDoc=ThisApplication.ActiveDocument
ForEachoSymbolInoInvDoc.ActiveSheet.SketchedSymbols
IfoSymbol.Name="Replace by"TheniProperties.Value("Custom", "Replace by")=???????EndIfNext
End Sub
I work with IV 2012
View 1 Replies
View Related
Jun 6, 2012
How to turn on/off text on the drawing? I`m working on the drawing template and would like to have a form that will allow engineer by checking check boxes to turn on/off certain text on the drawing.
View 3 Replies
View Related
Oct 26, 2011
I have created a ilogic rule that should set the size and the cut length of my parts. Most of the time the rule behave as I want it to. But sometime it gives me a error. See attached picture. By the way, I have included this rule in my custom content center parts (beam's etc). The rule is:
'Turn off workfeatures
ThisDoc.Document.ObjectVisibility.AllWorkFeatures = False
'check if the part has any geometry
If Measure.ExtentsLength="0" Then
[code]........
View 9 Replies
View Related
Jun 21, 2012
I'm new in use of iLogic and tried to use it by myself (and internet). But I have some difficulties.
Here is the open point, I wold like to create an assemblies with different length (and also some different part inside).
So I made some iLogic rules to make a configuration of my .iam with length selection.
I made rules to show or hide parts with is linked to the proper length.
I made rules to switch from a positional representation to another one and do the same for level of details representation and for view representation.
All is good in my .iam.
My problem is comming now. When I would like to put my .iam in a .idw in several views (corresponding to different length), my views are the all the same. I can't see one length per view even if I select the proper representation, the proper position and the proper level of detail.
At the end, all this work is to have all views length to be able to make in one drawing all length block in autocad.
View 3 Replies
View Related
Sep 18, 2012
I am trying to rewrite Curtis Waguespack's ilogic code to modify drawing view labels from this post http: [URL]...
The completed label should appear like this
<Description> - Mk <Part Number>
Est Unit Mass = X kg
(Scale 1:1)
At this point I have 2 problems
1. I want to add the physical mass to the second line and would prefer to use the calculated physcial property rather than the a custom iproperty. If editing the view label, it would the property access under physcial properties.
2. I want to rewrite the code so it is selective or per view - in otherwords, I only want it to modify a single view I select once the code is run. At this point I know I need to remove the For loop but I dont have a clue as to how to make it selective.
'start of ilogic codeDim oDoc As DrawingDocument: oDoc = ThisDoc.DocumentoModel = ThisDoc.ModelDocumentDim oSheets As SheetsDim oSheet As SheetDim oViews As DrawingViewsDim oView As DrawingViewoSheets = oDoc.SheetsFor Each oSheet In oSheetsoViews = oSheet.DrawingViews For Each oView In oViews oView.ShowLabel = True
[Code] ......
View 5 Replies
View Related
Apr 19, 2013
I am trying to create a rule that if a certain property is set to Gx then certain text on a template becomes invisble.
I have created a Text style and thought the following code would suffice....
Format:HTML Format Version:1.0 StartHTML:
165 EndHTML:
1942 StartFragment:
314 EndFragment:
1910 StartSelection: 314
EndSelection: 314
SyntaxEditor Code Snippet
Ifz_ValueS="Gx"Then
ThisDoc.Document.StylesManager.Text("Standard").Visible=FalseEndIf
But alas it does not work. I guess I could create the text using layers and make the layers invisible but is it possible.
View 1 Replies
View Related
Nov 22, 2013
I have a lot of pre existing sheet metal parts with my material listed as Steel, Mild.
I am using this code to automatcally fill out my iproperties but the material name is not exactly what I want it to say. iProperties.Value("Project", "Description")=iProperties.Material
I'd like it so that any time it sees Steel, Mild it replaces it with the text "A36"
AutoDesk Inventor 2012
View 1 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
Mar 5, 2013
I'm trying to create an iLogic rule that will print a text string to a cell or coloum of a parts list in inventor.
My code so far...
Sub Main()
On Error Resume Next
Dim oDrawDoc As DrawingDocument
oDrawDoc = ThisApplication.ActiveDocument
[code]......
I want to print what is in the Message Box into a cell in the parts list, and i am stumped. The cell i am trying to print to is a user property in the Parts List.
View 1 Replies
View Related
Jun 17, 2012
My iLogic ability is quite limited outside of what I use regularly?
I am trying to change the font style in every text definition in all my sketch symbols in one go. Actually I have started it based on only a selection set but I would be happy with just all symbols too. Below is where I got to, I am stuck on the For Each line to cover each text box in the symbol. Some of the other syntax may not be right either but I can't test it all the way through.
Dim oDoc As DrawingDocument: oDoc = ThisApplication.ActiveDocumentDim oSheet As Sheet: oSheet = oDoc.ActiveSheetDim i As LongDim oSymDef As SketchedSymbolDefinition: oSymDef = oDoc.SketchedSymbolDefinitions.Item(i)Dim oText As TextBoxesFor i = 1 To oDoc.SelectSet.CountFor Each oText In ............oSymDef.TextBoxes.Item(i).FormattedText ="<StyleOverride Font='ARIAL'>...< /StyleOverride>"NextNextInventorVb.DocumentUpdate()
Also the XML style override is not complete if this is the only way to achieve this result.
Inventor Professional 2013, Autodesk Simulation Multiphysics 2013
Windows 7 x64 Core i7 32GB Ram FX2000
View 6 Replies
View Related
Nov 2, 2011
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.
View 2 Replies
View Related
Oct 30, 2013
I have just started to use ilogic, what i want to do is measure the length of a loop in a sketch and then use this measurement as a parameter.
I have found this rule that will measure the loop length and display it in a message box
Dim se As SketchEntity = ThisDoc.Document.ComponentDefinition.Sketches(1).SketchLines(1)
MsgBox(ThisApplication.MeasureTools.GetLoopLength(se)*10 & " mm")
but i do not know how to capture the measurement as a parameter .
View 3 Replies
View Related
Oct 26, 2012
I had wanted to find a way to engrave/emboss the part number on a part model and have it be parametrically tied to the part number iProperty. Since it doesn't appear that I can create a text box and insert the iProperty directly, here's what I did to work around this. (I setup my part templates to have this out of the box....)
1. Within, the IPT file, add a user text parameter called "PartNo" and set its initial value to any text value.
2. Create your sketch for your text to be engraved. Insert the User parameter you just created.
3. Create the engraving/embossing for your text.
4. Create the following iLogic rule:
' Requires a User Text Parameter called "PartNo" prior to running' Set the appropriate event trigger to tasteIf Parameter("PartNo") <> iProperties.Value("Project", "Part Number") ThenParameter("PartNo") = iProperties.Value("Project", "Part Number")InventorVb.DocumentUpdate()End If
5. I set this rule to fire using the "iProperty Change" event trigger. So if the iProperty is set or changed, your text will update. Obviously, you can set this to run with whatever trigger you like.
Inventor 2014 64-bit SP1
Win 7 Pro 64-bit SP1
View 2 Replies
View Related
Mar 5, 2013
I'm trying to create an iLogic rule that will print a text string to a cell or column of a parts list in inventor.My code so far...
Sub Main()
On Error Resume Next
Dim oDrawDoc As DrawingDocument
oDrawDoc = ThisApplication.ActiveDocument
[code]...
I want to print what is in the MessageBox into a cell in the parts list, and i am stumped.The cell i am trying to print to is a custom property in the Parts List.
View 3 Replies
View Related
Nov 2, 2012
I was looking to change the fonts in a drawing for the Dimensions and Symbols that might have been inserted in the Dimension text entries.
This can be done manually bu editing the dimentions text after placemement, but I was ooking to set this as a default.. I cannot see where exactly this is controlled in the Styles Manager - I am only able to change the Dimension text font but the diameter symbol font is always on AIGDT.
I was therefore looking for an iLogicvb code that could do the trick, but I am not able to even change the dimension fonts... The code runs with no errors but nothing gets updated in the drawing...
Dim oDoc As DrawingDocument
oDoc = ThisApplication.ActiveDocument
Dim oSheet As Sheet
oSheet = oDoc.ActiveSheet
[Code]....
InventorVb.DocumentUpdate()
View 3 Replies
View Related
Apr 24, 2012
How would I go about creating a rule in iLogic which would limit the minimum length of a pipe (parameter = Pipe_Length) to be half the outer diameter of the pipe (Pipe_OD), in other words "Pipe_Length ≥ Pipe_OD/2"
I know you can use the limits wizard in iLogic, but is that not only for numerical values as opposed to parameters?
View 2 Replies
View Related
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
View Related