Parts List - how to get the value of a specific cell

Phenom
Phenom

Because our industry is still using methods from the middle ages, we have to use a mixture of letters and numbers for item balloons on our drawings.

This means we have to override some item numbers in the parts list, and in the balloons.

I want to semi-automate the synchronising of balloons with the overridden value (why Solid Edge can't do that is a mystery - Inventor does it !!!), but to do that I need to get the values of specific cells in the parts list.

How do I locate a specific cell in a parts list ?.

HP Z420 16GB RAM
Quadro K4000
ST7 MP10 on Windows 7 Pro 64.
7 REPLIES

Re: Parts List - how to get the value of a specific cell

Solution Partner Phenom Solution Partner Phenom
Solution Partner Phenom

The WritePartsListsToExcel Sample on GitHub is good. Looks like the trick is to use the PartsList.Cell[RowIndex, ColumnIndex] property.

Jason Newell
Applications Architect
www.jasonnewell.net

Re: Parts List - how to get the value of a specific cell

Phenom
Phenom

Got that Jason.

Another question -

Do you know if its possible to find all balloons that are linked to a specific parts list ?

Using Spy, I can't see anything that indicates there is a link, but in Solid Edge if you click on a parts list all the balloons connected to it are highlighted.

Unfortunately the balloons don't seem to be part of the select set.

HP Z420 16GB RAM
Quadro K4000
ST7 MP10 on Windows 7 Pro 64.

Re: Parts List - how to get the value of a specific cell

Solution Partner Phenom Solution Partner Phenom
Solution Partner Phenom

The Balloon object has a LinkToPartsList property, which is True, if the balloon is linked to a parts list.

In order to know the parts list to which a balloon is linked, you may look for the used item number in it.

Re: Parts List - how to get the value of a specific cell

Phenom
Phenom

Thanks Martin,

Yes I know there is the LinkToPartsList property but we may have multiple parts lists on a drawing, and these could have the same Item Numbers, so that doesn't tell me which parts list I need.

Alternatively I could select a parts list and process the balloons linked to it - if I could find which ones.

There may be other ways to determine the link - I'm open to suggestions !

HP Z420 16GB RAM
Quadro K4000
ST7 MP10 on Windows 7 Pro 64.

Re: Parts List - how to get the value of a specific cell

Phenom
Phenom

Ok, so I've got the balloons updating with the reference from the parts list.

I'm now trying to enable a 'reset' of the balloon back to parts list item number.

 

I'm finding that simply resetting the values objBalloon.LinkToPartsList = True and objBalloon.DisplayByItemNumber = True does not display the item number in the balloon. The text remains the same, ie. the over-ridden value.

 

Having run the code I find the values shown are set to true, so I have a balloon that is supposed to display parts list item number, but isn't.

Is there a way to force the parts list item number to be displayed ?

 

Edit: I have the reset working by reversing the initial update process, but would still like to know why the above settings don't work as I would expect.

HP Z420 16GB RAM
Quadro K4000
ST7 MP10 on Windows 7 Pro 64.

Re: Parts List - how to get the value of a specific cell

Solution Partner Phenom Solution Partner Phenom
Solution Partner Phenom

The settings are working. The problem is, that the balloons need to be redisplayed, just moving or panning the sheet or updating the drawing view does NOT help.

You have to manually pick and move a balloon to get its text updated.

In my code, I forced the update by temporarily moving the balloons back and forth in the Z position.

'----------------------------------------------------------------------
' DFT: Reset the balloon text
'----------------------------------------------------------------------
Dim objDoc As SolidEdgeDraft.DraftDocument = objApp.ActiveDocument
Dim objSheet As Sheet = objDoc.ActiveSheet
For Each objBall As Balloon In objSheet.Balloons
  objBall.LinkToPartsList = True
  objBall.DisplayByItemNumber = True
  objBall.DisplayItemCount = True
  ' Redisplay the balloons to update its displayed text
  objBall.SendBackward()
  objBall.BringForward()
Next

Re: Parts List - how to get the value of a specific cell

Phenom
Phenom

Thanks Martin,

I'll give that a try. Be a few days before I can though as I'm on holiday for a week. 😁

HP Z420 16GB RAM
Quadro K4000
ST7 MP10 on Windows 7 Pro 64.