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.
Solved! Go to Solution.
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?
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.
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.
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.