AutoCAD Inventor :: How To Convert Letter To Number In ILogic
Jun 27, 2012
I am making a iPart with iLogic. I need a function to convert letter to number or convert number to letter as we did in VB for Excel.
For example: Char(65)="A"; CODE("A")=65, and so on.
View 3 Replies
ADVERTISEMENT
Nov 7, 2011
Standard sheet number option gives you only 1, 2 and so on.
I want A1 where A does not change and 1 changes depending on sheet number.
View 1 Replies
View Related
Nov 5, 2013
How do I need to write the code in Ilogic to find the sin of a number. It works fine in a parameter as sin (43) but does not give the same value in ilogic.
View 1 Replies
View Related
Jul 7, 2011
My question: We want to use iLogic to save a PDF-file of the DWG-drawing every time we hit "save". We now use the following iLogic
Spoiler (Highlight to read)oPath = ThisDoc.Path PN = iProperties.Value("Project", "Part Number")
PDFAddIn = ThisApplication.ApplicationAddIns.ItemById("{0AC6FD96-2F4D-42CE-8BE0-8AEA580399E4}")
oDocument = ThisApplication.ActiveDocument
oContext = ThisApplication.TransientObjects.CreateTranslationContext
[Code] .....
View 9 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
Jan 28, 2013
I have made a configurator, that defines my part. Now i would like to add some intelligence for the Save process...
When i activate my rule it should.:
1. Go to a Excel spreadsheet and find next Empty cell in a specific collum
2. Place Title from inventor in that empty cell
3. Return the value from the cell next to this cell
3. Use this value as the new filename for my part.
Example: here i would like to get the parts tile put into B3 and A3 (103) returned to Inventor as filename to my part
--------------------
A B C
1 101 Title1
2 102 Title2
3 103
If possible, i would like to be able to adjust this alittle as i go forward in my work,
View 9 Replies
View Related
Dec 7, 2011
I need to use/write a iLogic code. I have a assy, in this assy i have parameter Height and Width. And it´s no problem to controlls this two rules/value.
But I have a problem with the rule when my height will control the number of parts
If my height is 500-1000, one part.
If my height is 1000-1500, two parts.
If my height is 1500-2000, three parts.
Is it best to use suppress or use a pattern in this case?
View 1 Replies
View Related
Jul 4, 2012
I want my browser name using iLogic particular change to the part number. I fill in my iproperties, the part number. Then the browser name has to take over the part number.
But i get an error.
doc = ThisDoc.Document
Dim oCC As ComponentOccurrence
For Each oCC In doc.ComponentDefinition.Occurrences
OccName = oCC.Name
oCC.Name = iProperties.Value("Project", "Part Number")
Next
View 4 Replies
View Related
Nov 29, 2012
I dont no in english if odd number is the right word but i want to make all my number to 1, 3, 5, 7, 9, etc,....
View 9 Replies
View Related
Dec 11, 2012
How to reference the drawign sheet number using iLogic? I see on the snippets on the side a way to reference the sheet name, but I only want the number. To get the name it is ActiveSheet.Name, but ActiveSheet.Number does not work. Getting the name give something like ASSM:1, so if there was a way to take that and subtract the colon and everything before it that would work also. I am not a programmer, I've just taked some programs I found online and modified them a little to do what I want to do, but this is holding me back a bit.
Overall, I'm trying to modify the drawing view label to have a project number, referenced from the drawign iProperties, a view label, and sheet number, and then save that info in an iproperty of the part, and then reference that in the BOM so it automatically labels all of the views and fills out a column of the BOM to reference which page and view to find the parts of the assembly. I have everything working except for the sheet number.
View 5 Replies
View Related
Sep 21, 2011
I would like to have the part number automatically be entered with ilogic.
Normally I know how to do this but this time I'm trying to have a couple constant letters with numbers to be filled in.
Example
MGR72
MGR is constant and the 72 will change with the width
What I thought would work but doesn't is
iProperties.Value('Project", "Part Number")="MGR" Width
View 2 Replies
View Related
Nov 15, 2011
I'd like to create a part number generator using iLogic. The rule would run as follows:
If the iProperty "Part Number" was not blank or the same as the file name (as Inventor default), then a question box would pop up asking if you would like to overwrite the part number. If one were to select yes, then the following would happen.
iLogic would open an xls that is on the network. The xls would have two columns. Column A would be the part number, B would be the filename associated with that part number.
Column A (the part number) is a sequential count in the form of 6 or seven digits. The format would be something like =TEXT(ROW(A1),"JFRC-000000")
Everytime the part number generator rule is triggered, it would create a new part number on the next blank row, copy this part number to the Part Number iProperty and assign the file in which the iLogic rule was executed to column B in the xls, save and close.
If, when the rule is triggered, the Part Number property is blank or the same as the file name, the user would not be asked if they would like to overwrite the part number. This rule would be triggered manually from a form.
View 2 Replies
View Related
Aug 15, 2012
iLogic rule that will retrieve a part number(s) from an excel sheet. I work for a company that built vacuum trucks and I'm trying to make an . I am template where the user can select different lengths of shells to achieve the desire overall length. I have been able to achieve this using iLogic rules and forms and making the shell length parameter multi value.
But now I need to show predetermined SAP part numbers for the shells in BOM or part list. I all ready have an excel sheet with shell sizes with corresponding part numbers on file. I also thought about incorporating our custom CC parts/shells that already have the SAP part numbers set up as a custom iProperty but might be to complicated for a newbie iLogic user.
View 9 Replies
View Related
Oct 31, 2013
I have a part number that i want to defined in custom properties.
Then would it be possible to call it out in Ilogic? that way in any drawing doesn't matter where the part number will always be the same for that part when i balloon and the same in the BOM.
View 4 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 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
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
May 27, 2013
I'm working with Autocad 2011. My objective is to create a dynamic block made up of a circle with a letter or number inside. Here's the tricky part. As I add additional letters or numbers the circle increases in diameter automatically to fully encircle whatever it is I type. The more letters or numbers the larger the circle and the fewer the letters or numbers the smaller the circle?
Or is there a lisp routine for this type of request?
View 5 Replies
View Related
Aug 16, 2005
How do I outline a letter or a number? For example, I have a black, arial font, 200 pt number 5. I would like to put a thin outline of another color, say red, around it. I have tried making a larger number 5 on a different layer and placing it under the smaller number but that gives me more of a drop shadow effect which is not what I am looking for.
Here is an example: .....
View 4 Replies
View Related
Oct 27, 2013
Is it possible to change a normal assembly into a weldment assembly through iLogic?
View 4 Replies
View Related
Sep 27, 2011
I have a parameter length that is currently in inches and I would like to use it to populate the description but I would like it to be displayed in Architectural style (i.e. 12’-3”). I would also like to have it round up to the nearest 3”.
View 4 Replies
View Related
Jul 6, 2012
The file naming scheme to add a letter or number to a file name does not work correctly.
Using the Save Image function in CR if I select a File Naming scheme of Document Name = Serrial Letter, I get a file that has a letter 'a' added to the end.
Subsequent saves maintain this 'a' and then add an underscore and an incrementing number. If I select a serial letter then the letter should be the only thing added and it should increment with subsequent saves.
What happens now:
Original file: IMG8102.CR2
First Save: IMG8102a.jpg
Second Save: IMG8102a_1.jpg
Third Save: IMG8102a_2.jpg
What should happen:
Original file: IMG8102.CR2
First Save: IMG8102a.jpg
Second Save: IMG8102b.jpg
Third Save: IMG8102c.jpg
Why would I get a number when I asked for a letter?
View 7 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
Jul 2, 2012
Is there a way to convert an Inventor 2012 view scale from "0.5" to "1:2" or similar within an iLogic rule? I can extract the main view scale and plug it into a variable but the format isn't correct for the drawings I'm creating.
View 2 Replies
View Related
May 28, 2013
I have one problem in ilogic "How to convert the normal dimension to driven dimension through ilogic"
View 4 Replies
View Related
Jun 26, 2013
I have a project with many different blocks of text, and colors changing from letter to letter within words.
How do I identify what any given color is?
When I click on a letter, it shows me a visual block of the color, but doesn't tell me what the corresponding color number is.
Problem being, if I see one letter and want to take its color to use it elsewhere, I have no way of knowing what that color is.
View 1 Replies
View Related
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
Apr 4, 2013
I want to create a label with a textbox (myabe) in which i will write by my keyboard a word.After that i want to press the "Enter" button and the programm do this simple thing...."SPELL" each letter of my word, an activate a specific command each time and in my case a specific RULE from iLogic.
For example, i wanna whrite my name.....NIKOS....and after pressing the ENTER button, firstly my programm read the letter "N" and trigger the Rule1....After a specific time (that i want to defined by myself, probably with a timer) the programm read the right next letter which is "I" and activate the next Rule2...Until the last letter where it will end.
I should note here that i already have the code that i can calling as Rule i wish.But i dont know how to use it for my job....
The code is the following...
Dim iLogicAuto As Object
Set iLogicAuto = GetiLogicAddin(ThisApplication)
If (iLogicAuto Is Nothing) Then Exit Sub
Dim doc As Document
Set doc = ThisApplication.ActiveDocument
[Code] .......
View 9 Replies
View Related
May 3, 2012
How to set or force i Properties always to uppercase letters in Inventor 2010 or higher?
View 3 Replies
View Related
Aug 1, 2012
When I do a section in a drawing, i always have to replace the letter a end of arrow.
Is there a way so the letters will always be at end of arrow?
View 2 Replies
View Related
Mar 21, 2013
I have a question regarding parameter naming. A good number of my parts are made to standards with different size classes. ( AS, MS, JIS etc )
In these parts the dimensions are given with a single letter designation ( A, B, C etc ). Unfortunately, Inventor does not allow some ( a good number actually ) letters to be used as a single digit parameter. Until now I've been using "DimA", "DimB" etc. but I'd like to find a way to use just A, B, C .... just as it is on the prints.
View 8 Replies
View Related