Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations GregLocock on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

I Have a question about API for Solid Edge V19 (get specification) 1

Status
Not open for further replies.

Garik

Computer
May 4, 2007
8
I'm using Solid Edge V19 and VB6 to get a specification from my draft (*.dft).
How can I get specification from the draft in Solid Edge from API?
 
Replies continue below

Recommended for you

Hi,

hmm, what do you mean with 'specification', the sheet size?
This can be obtained by:

<objDraft>.ActiveSheet.SheetSetup.SheetHeight

also the SheetWidth, SheetSizeOption and other data is stored
within the object SheetSetup

dy
 
hi

i do it, but (((

The specification of the drawing is a table which contains the nomenclature of details which enter in assemble with the instruction of quantity and a position of each detail.

e.g.:
--------------------------------------------------------
position | name of detail |description | quantity |
--------------------------------------------------------
1 | 43.00.00.800 | pump | 1 |
--------------------------------------------------------
8 | 43.00.10.073 | jar | 2 |
--------------------------------------------------------

My English is very bad sorry (
 
Hi,

ahh, you mean the partslist. That is available through the
API: set <objPlist> = <objDraft>.PartsList.item(1)

Usually you only have one parts list but it might not be the case
so the <objDraft>.PartsList object is a collection and the
<objDraft>.PartsList.count holds the number of available
partslists if any.
But you won't be able to drill down to the individual cells
for there is no mechanism in the API to do that. The only way
to access them is to copy it to the clipboard:

<objDraft>.PartsLists.Item(1).CopyToClipboard

From there it can be read programatically. The columns are
seperated by 0x09 and the rows by 0x0a. The whole thing is terminated
by 0x0d0a (vbCrLf).

Also possible is to manually select the partslist within the
draft. Then do an RMB (right mouse click) and select 'Copy Contents'
Now you can paste it into Excel for further processing.

dy
 
Thank you very much! I gonna to ask last question:) whether it is possible to receive a material of details from the draft (*.dft)?
 
Hi,

do you mean the material that is assigned to the part?

That can be obtained by following the ModelLinks

Dim objPart as object
set objPart = <objDraft>.ModelLinks.item(1).ModelDocument
sMaterial = objPart.Properties.item("MechanicalModeling").Item("Material").value

Check the ModellDocuments type: when it's an assembly no
material is available unles it has been assigned a WeldmentAssmbly


HTH

dy
 
Hi!
Thanks for full answers!
I work in Russia at a machine works and I interface SolidEdge to our program.In process of development there is a set of questions. Unfortunately nobody knows as to answer my questions in Russia. Thanks you for the help! You save my life once again:)
 
Hi,

you're welcome. To have some samples (VB6) you may
have a look at this site:

[link=http://www.incobase.de/downidx_cad_se.html]SE-Modules[/url]

dy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor