Cancel
Showing results for 
Search instead for 
Did you mean: 

Parts Lists - how to get the height

Phenom
Phenom

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
ST10 MP6 on Windows 10 Pro 64.
9 REPLIES

Re: Parts Lists - how to get the height

Solution Partner Legend Solution Partner Legend
Solution Partner Legend

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

Phenom
Phenom

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
ST10 MP6 on Windows 10 Pro 64.

Re: Parts Lists - how to get the height

Solution Partner Legend Solution Partner Legend
Solution Partner Legend
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

Phenom
Phenom

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.

 

Capture1.JPG

HP Z420 16GB RAM
Quadro K4000
ST10 MP6 on Windows 10 Pro 64.

Re: Parts Lists - how to get the height

Solution Partner Legend Solution Partner Legend
Solution Partner Legend

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

Phenom
Phenom

Thanks Wolfgang, I'll do that.

HP Z420 16GB RAM
Quadro K4000
ST10 MP6 on Windows 10 Pro 64.

Re: Parts Lists - how to get the height

Creator
Creator
Did you ever get any progress with this? I noticed that this issue is still happening in ST9 MP12.
ST9 MP10
ST10
VS2017 VB.Net & C#

Re: Parts Lists - how to get the height

Solution Partner Phenom Solution Partner Phenom
Solution Partner Phenom

The problem still persists in ST10 MP4!

Re: Parts Lists - how to get the height

Phenom
Phenom

@mpowers

No, I never got a solution but it has not been a problem because we never get more than one parts list spreading to more than one page.

To be honest I'd forgotten all about it - there have been many other more pressing problems to sort out.

My job is design, but I write a few macro's as and when required and if I have time.

HP Z420 16GB RAM
Quadro K4000
ST10 MP6 on Windows 10 Pro 64.