Reply
Solved! Go to solution

Parts Lists - how to get the height

I'm looking for a way to find the height of a parts list in a draft file.

We have multiple parts lists on drawings and its a pain stacking them manually, so I want to automate the stacking. I can find the location of each and align the X location very easily, but the vertical position relies on being able to find the top of each one.

I can't see any way of doing this, but a parts list knows when it exceeds the maximum height value.

HP Z420 16GB RAM
Quadro K4000
ST7 MP10 on Windows 7 Pro 64.
6 REPLIES
Solution
Solution
Accepted by topic author beachcomber
‎08-26-2015 04:32 AM

Re: Parts Lists - how to get the height

Hello,

the TablePage object owns the properties Height and Width. PartsList.Pages returns the collection of TablePage objects.

Kind regards,
Wolfgang Kunert - www.wksyspro.de

Re: Parts Lists - how to get the height

Thanks Wolfgang.

I have the basic functionality working.

Just one thing I'm not sure of - how do I check that the items selected are parts lists?

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

Re: Parts Lists - how to get the height

objObject = objSel.Item(1)
If TypeOf objObject Is SolidEdgeDraft.TablePageThen

End If

Then check the TypeOf objObject.Parent to be of type PartsList
Kind regards,
Wolfgang Kunert - www.wksyspro.de

Re: Parts Lists - how to get the height

I have this working but I'm trying to develop it to take account of the first parts list spreading onto multiple pages. It is not very likely that we will have more than one parts list where this happens, but I'd like to cover that scenario.

 

I can find the number of pages easily enough and would have thought that each would have it's own origin values, so I could set p = pages.count and get the values from there.

However, when i try this, the index "p" is not valid.

Using Solid Edge Spy I see that although there are 2 pages there is only 1 item.

I would have expected to see 2.

 

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

Re: Parts Lists - how to get the height

This looks indeed like a wrong behaviour of the API and does not reflect what you see when checking the properties of a PartsList interactively in Solid Edge.

I could verify your problem with Solid Edge ST6 and ST7 and don't have a solution for you so far.

You should give a problem report to Siemens about.

 

Kind regards,
Wolfgang Kunert - www.wksyspro.de

Re: Parts Lists - how to get the height

Thanks Wolfgang, I'll do that.

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