AutoCAD Inventor :: ILogic Sort Values

Feb 20, 2013

I have an iLogic rule that populates the fields shown below in our title block. The DIM. Values are strings set with H,W,L values. This works well, but I have an additional need to sort these values in ascending order, so the smallest value is first followed by the next largest and finally the largest value. (4.000x5.000x14.000). I haven't had much luck finding any information about how this can be done. I did however come across some code here that someone else was using for a similar feature.
 
Dim sizes As New List (Of Decimal)sizes.Add(bH)sizes.Add(bW)sizes.Add(bL)sizes.Sort()D1 = sizes(1)D2 = sizes(2)D3 = sizes(3)

This is what I have been attempting, though it does not work. I get the following error "Index was out of range. Must be non-negative and less than the size of the collection. 

Parameter name: index". I'm not sure if my list type is correct (Decimal), but no matter what I choose it fails. The (bH,bW,bL) are the actual block dimensions pulled from the .ipt file. Once sorted I want the values of each position (1),(2),(3) to be assigned to (D1),(D2),(D3) so I can place them in my title block in the correct order.

View 3 Replies


ADVERTISEMENT

AutoCAD Inventor :: ILogic To Sort BOM?

May 22, 2012

I have been unable to find any code to sort the BOM, there are lots of snippets to sort and modify the Parts list.

How to sort the Assembly BOM?

Sort parameters:

PARTS Only

"BOM Structure"

then by

Custom Parameter "TYPE"

Then By

Part Number

Then "Renumber" starting at 1

Autodesk Product Design Suite Premium 2014 SP1 Build 222
Intel Core i7 (950@3.07GHz)
Windows 7x64 (Home) - 12GB Ram
Nvidia GeForce GTX 560 Ti (1Gig - Ver:331.65)

View 1 Replies View Related

AutoCAD Inventor :: Parts List Sort Using ILogic

Nov 7, 2011

I have got some ilogic code that i have patched together to sort my parts list in inventor which works great but it will not update all sheets at the same time as when we design we have multiple sheets with parts list on and the odd one without.

add to this code to update all sheets partlists and also recognise that some sheets will not have partslists on so this will need to skip. 

below is code that is used to sort

Format:HTML Format Version:1.0 StartHTML:     165 EndHTML:    4558 StartFragment:     314 EndFragment:    4526 StartSelection: 314 EndSelection:     314
SyntaxEditor Code Snippet
Format:HTML Format Version:1.0 StartHTML: 165 EndHTML: 4558 StartFragment: 314 EndFragment: 4526 StartSelection: 314 EndSelection: 314
[Code] ...........

View 4 Replies View Related

AutoCAD Inventor :: ILogic To Sort BOM - Renumber Items As Sorted

Jun 13, 2011

I want to use iLogic to:

1.Sort an assembly BOM by Part Number.

2. Renumber Items in the BOM as sorted.

3. Sort a drawing Parts list by item number.

The background to my problem is that i have an assembly which is working beautifully turning components on and off (suppressing/activating in LOD reps) as defined by iLogic rules (iLogic is awesome). The problem is whenever a part is turned on/activated again, it shows up at the bottom of the BOM and Parts list out of order (would be nice if parts went back in the list where they came from).

View 7 Replies View Related

AutoCAD Inventor :: BOM Renumbering And Part List Sort By Item (iLogic)

May 15, 2013

i = MessageBox.Show("Do you wish to Renumber & Sort BOM?", "My iLogic Dialog", MessageBoxButtons.YesNo, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button1) If i = vbyes ThenTrace.WriteLine ("INV - Transfer; User Selection; Do you wish to Renumber & Sort BOM? - YES")'Renumbers & Sort BOMoPartsList1.Renumber oPartsList1.SaveItemOverridesToBOMoPartsList1.Sort("ITEM") Trace.WriteLine ("INV-ExternalRule - Renumber & Sort BOM#")Else if i = vbno Trace.WriteLine ("INV - Transfer; User Selection; Do you wish to change Renumber & Sort BOM? - NO")End if

what i want to do, is renumber the BOM by (001) then go to part list and sort by item.

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 And Excel Spreadsheets - Linking Values

Mar 6, 2012

Ok what I'm tring to do is have a spreadsheet that has a list of prices in it that we could modify if needed for all these parts i'm making.  Best way is to have the spreadsheet obviously external of the file.Though now I do not know how to do this in iLogic.And example of what I'm trying to do is, with 3 parameters.

A, B, and P

Value "A" and Value "B", these are just read items which when combined will give Value "P" to be imported into the Part file.  So need A & B to be read and give the row number for P to be imported.

View 3 Replies View Related

AutoCAD Inventor :: Create User Parameter Values With ILogic

Oct 29, 2012

Macro for writing the sheetmetal Extents width and length to the custom properties.  I need to get these values into the part parameters so that they can be used in the BOM.

I can get this to work if I manually create the "SM_Length" user parameter, but how do I make the iLogic CREATE the parameters if they do not already exist?  I think it would be something added below the "Catch..." just cant seem to figure out what it needs to be.

'look for custom iproperty and try to set it
Try
iProperties.Value("Custom", sExtLength)=Round(SheetMetal.FlatExtentsLength, iRoundValue)
Parameter("SM_Length")=Round(SheetMetal.FlatExtentsLength,4)

Catch
' assume error means not found and create it
customPropertySet.Add(Round(SheetMetal.FlatExtentsLength,iRoundValue), sExtLength)
EndTry

View 9 Replies View Related

AutoCAD Inventor :: Editing Prompted Entry Values With ILogic

Dec 11, 2013

I have been attempting to automate some prompted entry (PE) values using iLogic and the SetPromptResultText command.

The command works on the customer-supplied template I have if I create a new PE called <DELETEME> - my code also works on this new PE even if I delete the "<" & ">" from either end of the string so it becomes "DELETEME".

The command doesn't work on the customer supplied fields of "PURPOSE OF ISSUE" & "PROJECT REF No" but if I add < & > to either end (so they become "<PROJECT REF No>" & "<PURPOSE OF ISSUE>" respectively) and modify my code to look for that instead, lo and behold it works.

why it works with the "<" & ">" on the ends of the string but not without?

My guess is that the "<" & ">" allow the PE to have spaces and without it Inventor 2013 throws the dummy in the dirt and refuses to play nice! - Just tested that theory and it's clearly cobblers.

Here's the sub-routine I wrote (with the working "<" & ">" still in place):
 
Sub UpdatePromptedEntries(oDoc As DrawingDocument)'assumes the oDoc is activatedDim oPromptEntryDim actSheet As Sheet = ThisApplication.ActiveDocument.ActiveSheet'For Each oSheet In ThisApplication.ActiveDocument.SheetsFor Each oSheet In
[code]........

View 4 Replies View Related

AutoCAD Inventor :: How To Stop Automatic Update In ILogic While Entering Values In UI

May 19, 2013

I have one problem in ilogic i developed the model using ilogic rules and dimension values updated through the User interface form.

problem is while entering the values in UI, model updates automatically, but I want to stop automatic update and after entering the all the parameters in the UI then click the done button only update the model.

My UI is like this

It's possible.

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 :: Sort Structured BOM View

Feb 13, 2012

I'm trying to sort a structured Bom View through .Net Api in Inventor 2012. I'm using Sort method of BOM View object. I don't get any error but BOM isn't changed after this call.

I've tried :

oBv.Sort("Item") or oBv.Sort("Item", False)
oBv.Sort("Part Number") or oBv.Sort("Part Number", False)

View 9 Replies View Related

AutoCAD Inventor :: Sort Sheets In Browser?

Feb 10, 2012

Im working on something just now but ran into a problem when a new sheet is added after one that is excluded from count.

What i need is to re sort the sheets in the browser so the excluded ones go to the end. Im thinking i would need to loop through the browser nodes somehow but the skills elude me.

View 1 Replies View Related

AutoCAD Inventor :: Alpha Sort Browser Nodes

Jun 4, 2013

Is the alpha sort function available trough API ? It's located in Assembly tab, Productivity tools. I'd like to use it in a custom program instead of asking my customer to click on the button.

View 2 Replies View Related

AutoCAD Inventor :: Sort User Parameters By Code

Apr 10, 2013

I work with Inventor 2011.

It is possible to sort Parameters (user parameters) by code (simulating a click on column header) ?

View 3 Replies View Related

AutoCAD Inventor :: Sort BOM While Avoiding Locked Parts

Dec 3, 2012

I need to sort the BOM (structured) while avoiding three parts. So I attempted manually locking the three parts in the BOM through the user interface and then running the following code

 ' Set a reference to the assembly document. ' This assumes an assembly document is active. Dim oDoc As AssemblyDocument oDoc = ThisApplication.ActiveDocument

' Set a reference to the BOM Dim oBOM As BOM oBOM = oDoc.ComponentDefinition.BOM

' Make sure that the structured view is enabled. 'Set a reference to the "Structured" BOMView Dim oBOMView As BOMView oBOMView = oBOM.BOMViews.Item("Structured")

'The following line works correctly Call oBOMView.Sort("Part Number",True) 'Re-Number the BOM Call oBOMView.Renumber(3, 1) 'Re-Sort Items 'Call oBOMView.Sort("Item",True)

The above code is bits and pieces that I have combined from the internet. The only problem with it is that sort works fine on some files while on others it skips a few e.g. 1,2,5,6,7......

Is there any way we can sort the BOM while avoiding all the locked parts.

View 5 Replies View Related

AutoCAD Inventor :: Any Sort Of Live Update Tool That Comes With 10 Series?

Jun 25, 2006

Is there any sort of "Live Update" tool that Comes w/ Inventor 10 series? I have been to the "downloads" page at Autodesk site for Inventor 10, and have already installed sp3a, and a couple of the hotfixes (1054780 & 1057155) - I was trying to follow the dates and hotfix numbers in an effort to bring my product completely up to date, but now Inventor does not seem to be working correctly - I suspect that I did something in the wrong order. How can I know that my product is completely up-to-date, and is it possible to get a sequential list of SP's and Hotfixes so I know what order I'm supposed to install? I have also tried "repair" from the installation disk, but after "gathering all required information", nothing happens.

View 3 Replies View Related

AutoCAD Inventor :: How To Sort Parts Inside Browser Folder

Nov 17, 2012

Alpha sort in assembly bonus tool sorts outside browser folder. Is there any method (API) to sort inside browser folder?

View 3 Replies View Related

AutoCAD Inventor :: Sort Sketch Blocks In A Part File?

Sep 17, 2012

Is there any method to sort sketch blocks in a part file? All of our sketch blocks are numbered with a profile number. When we create a new multi-body assembly we will often derive 50-100 of them into the master file. It would be great if we could sort them by profile number.

The next best solution would be the ability to create sub-folders to place them in by type (sort of like assembly folders), but I'm pretty sure this isn't possible.

View 1 Replies View Related

AutoCAD Inventor :: Sort (Resort) A Hole Table Via Code?

Oct 8, 2013

How do you sort(Resort) a hole table via code?  The hole table does not appear to have a .Resort member.

I would think it would be oHoleTable.Resort.

Inventor Professional 2014 64 Bit
Windows 7 Professional
NVIDIA Quadro FX 4600
Dual Intel Xeon E5540 CPUs
16GB DDR3 Ram

View 2 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Attribute Blocks - Change 1st Tag Values Automatically According To 2nd Values

Jul 18, 2013

I have an attribute blocks and this att block has two tag values , is there a simple code for to change 1st tag values automaticly according to  2nd values ?

for example :

1st tag (50x50) - 2nd tag ( 100 )    ==> 50x50-100

if i enter 201 valuse to 2nd tag then 1 st tag has to change as 100x100

if i enter 501 valuse to 2nd tag then 1 st tag has to change as 150x510

I attached a jpg file for explain much better

View 9 Replies View Related

AutoCAD Civil 3D :: Description Key Layer Set To No Values After Values Set?

Apr 18, 2013

Is there a way to have no layer value set for the description keys. I set all the layers, and now I realize I'd rather set this to no layers (boxes are all unchecked). I'd rather see no value under the layer column, but there doesn't seem like a way to set this. 

View 1 Replies View Related

AutoCAD Inventor :: New File Dialog All Columns Returned To Their Default Size And Sort Also Reverted

Aug 2, 2012

Having problems with the updated new file dialog and I'm not talking personal problems. I switched it to detail view and widened up the name column so I could see the whole name. I could actually live with that setup however the next time I opened the new file dialog all the columns returned to their default size and the sort also reverted.

Is it just me or does the new file dialog not remember any changes to it's layout?

View 2 Replies View Related

AutoCad :: Sum Values That Are Entered As Text Values?

Dec 21, 2012

Can AUTOCAD sum values that are entered as text values? Attached is a table text whose right final values should be all sumed up? Is this possible inside AUTOCAD?

View 9 Replies View Related

AutoCAD Inventor :: Cannot Set Values Of A Sketch Point

Jan 17, 2012

I'm trying to contrain the end points of 2 lines using iLogic. I know the end points but I cannot get the values into the SketchPoint object. The real odd thing is I can create the lines no problem. I tried it 2 different ways shown below. The first way gives me this error..."Object reference not set to an instance of an object.". The second says "Unable to cast COM object.."

Dim oTG As TransientGeometry
oTG = ThisApplication.TransientGeometry
Dim EntityEndPt As SketchPoint
EndPtX = 0 * 2.54
EndPtY = 3 * 2.54
‘Code Fails Here!
EntityStartPt.Geometry.X = EndPtX

View 5 Replies View Related

AutoCAD Inventor :: Retrieve Values Of An Occurrence?

Feb 12, 2013

I try to retrieve the values of an occurrence in an assembly document, same as when I click on 'Change size' (see the attachment).

I Know how to get key values (from list) from content center family member (Getting data from content center) but for the expression values (from user entries), I found nothing.

View 1 Replies View Related

AutoCAD Inventor :: How To Add Class Of Steel Values

Jan 3, 2014

We use several different classes of steel such as A572-65 or A572-50 etc. Any way to add those values in Inventor 2014 without having to reinvent the wheel?

View 3 Replies View Related

AutoCAD Inventor :: Dimension Values Incorrect On Drawing?

Sep 6, 2013

I'm using Inventor 2013.  I created an assembly where I did a lot of top down modeling (meaning components in the assembly were created in the assembly.  All but a handful of the components are adaptive to other components).  When I went to make my drawings for having the components made, I started noticing that some of the dimension values were wrong.  I could go into the model and verify the features, but when dimensioning on the drawing it would not match.  Furthermore, this didn't occur on every dimmension on the drawing.  Not even half of them were incorrect, but it only takes one to really mess up a part.

I've attached a screen shot of what I'm seeing.  The 15.2 and 5 dimmension are correct, but obviously those don't add up to 31.37.  I know I can manually override this dimmension, but only if I know to do it.  I tried to do a drawing of another part in the same assembly and eventually found a similar problem. 

Finally, I created a step file of the 1st part (to strip away the adaptivity) and when I created the drawing again, the problem went away.

My question is, is there something I did in the assembly / creation process that would have caused this? 

View 4 Replies View Related

AutoCAD Inventor :: Auto-changing Values In BOM Columns

Nov 2, 2011

Is there any way that values in BOM columns would automatically change depending on the characteristics of the part?

Example:

I have a parametric metal rod that depending on its length has a different part number assigned to it in our company's catalog.

When I change its length  in parametric assembly (50" rod is has different number than 70" rod) I want the part number to change as well in the "part number" column.

View 5 Replies View Related

AutoCAD Inventor :: How To Add Angle Values Of Frame Profile

Jun 18, 2012

is it possible to add into parts list or into BOM values of frame angles?

Unfortunately, Inventor (I use Inventor 2013) does not offer this property by default in parts list settimgs. There are mass, file name, designer, project, status, vendor etc) but nothing about cut angles...!

P.S. I add JPG file with example that I need to get.

View 7 Replies View Related

AutoCAD Inventor :: Place The Same Part In A Assembly With Different Values?

Apr 19, 2013

If a place a pipe piece with a length fro example 350mm and I place another pipe piece with a length of 400mm. Is there a way to place the same part with the two (or more) values? I did try the iPart route and to create a multi value in my part parameter for the length equation but in both cases you can only select a length and all the parts in the assembly updates to the new length selection.

View 9 Replies View Related







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