How to get quantities from partlist?

 

Hello,

I am very very new to solid edge programming (started today), i hope you can help me

In the attachment draft, there is a part list and the 4th column shows the quantity of each assembly/part. The problem is to get the quantities and write each quantity to each assembly/part file as textbox.

Thanks indeed,

Taner

 

Posted by: Taner Pro
Post date: 10/3/2007 3:22:23 AM

2 REPLIES

RE: How to get quantities from partlist?

Hi TranerPRO and welcome to the forums.

 

The 1st thing I would suggest you do is download and install my free Solid Edge Spy product. You can find it in the Products page. Then you can open your Draft in Solid Edge, connect to Solid Edge in Solid Edge Spy and then you'll be able to see the runtime COM object model. Once you've done that, navigate to the following path:

 

Application -> ActiveDocument -> ActiveSheet -> DrawingViews -> Items -> DrawingView XXX -> ModelLink -> ModelDocument -> Occurrences -> Items -> (Any item is fine). At that point, you'll see the objects properties on the right where you should see Quantity. You can loop through the Occurrences to get all of the items quantities.

 

The 2nd part of your question I don't understand. i.e. Writing each quantity to each assembly/part file as textbox. Can you be a little more descriptive of what you're wanting here?

 

Also, if you need a coding example, please specify the language you're wanting to use. You might also take a look at my Downloads page. It has many coding examples from previous Solid Edge Developers Conferences that I've spoken at.

 

Good luck!

 

Posted by: Jason Newell
Post date: 10/3/2007 9:15:36 AM

RE: How to get quantities from partlist?

Hello,

Thank you for your reply and i am so sorry for writing too late...

in the attached file, i can't get the quantities directly. For ex:

 

1st column Part No

2nd Part Name

3rd Drawing Name

4th Quantity

5th Material

6th Mass

 

In the first column number 15, there are 2 of this part in the draft. When i loop through the occurences i get these results

 

Drawing Name Quantity

-----------------------------------------------------------------------

KASTAS_K73_2,5x9,7x495.par:1 1

KASTAS_K73_2,5x9,7x495.par:2 1

 

 

I get the same drawing name as much as the quantity, i cant get KASTAS_K73_2,5x9,7x495.par:1 with the quantity 2. Do I have to count each part manually if there are more than one?

 

2) How can i get the mass property from the part list?

 

I dont know why the mechanical engineering team wants this but they do Smiley Happy

I am using VB 6

Thanks indeed,

Best regards

 

Posted by: Taner Pro
Post date: 1/2/2008 2:55:26 AM