cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X

How to get CAD Structure

adev
1-Visitor

How to get CAD Structure

Hello friends,

I am looking for a query which can return me the CAD structure in windchill does some body know how we can achieve this. please see the screen shot

ACCEPTED SOLUTION

Accepted Solutions
BineshKumar1
13-Aquamarine
(To:adev)

SELECT DISTINCT A0B.name ParentName,

                A0B.documentNumber ParentNumber,

                A2B.name ChildName,

                A2B.documentNumber ChildNumber

FROM            EPMDocument A0,

                EPMDocumentMaster A0B,

                EPMDocumentMaster A1,

                EPMDocument A2,

                EPMDocumentMaster A2B,

                EPMMemberLink A3

WHERE           (A0.idA3masterReference=A0B.idA2A2)

AND             (A2.idA3masterReference=A2B.idA2A2)

AND              ((A0B.name = 'ER00020039.asm'))

AND             ((A3.idA3B5 = A1.idA2A2)

AND              (A3.idA3A5 = A0.idA2A2)

AND           (A2.idA3masterReference = A1.idA2A2));

Try this. It worked on my system to get level 1 CAD structure.

Thank you

Binesh Kumar

View solution in original post

7 REPLIES 7
BineshKumar1
13-Aquamarine
(To:adev)

User epmmemberlink table to connect two epmdocuments. If you are looking for reference documents, use epmreference table

Thank you,

Binesh

Hi Binesh,

I try this but seems like not getting the accurate result

SELECT    dM2.DOCUMENTNUMBER AS ASSEMBLY, M1.DOCUMENTNUMBER AS COMPONENT

FROM      EPMDOCUMENT, EPMDOCUMENTMASTER M2, EPMMEMBERLINK, EPMDOCUMENTMASTER M1

WHERE       EPMMEMBERLINK.IDA3B5 = M1.IDA2A2

                   and M2.DOCUMENTNUMBER = 'W10805805_CP01.PRT'

                   and EPMDOCUMENT.IDA3MASTERREFERENCE = M1.IDA2A2

GROUP BY  M2.DOCUMENTNUMBER, M1.DOCUMENTNUMBER

order by  M2.DOCUMENTNUMBER, M1.DOCUMENTNUMBER;

BineshKumar1
13-Aquamarine
(To:adev)

Could you try this one?

EPMDocument A0,EPMDocumentMaster A1,EPMDocument A2,EPMDocumentMaster A3,PDMLinkProduct A4,EPMMemberLink A5

A0.idA3masterReference = A1.idA2A2

A2.idA3masterReference = A3.idA2A2

A5.idA3B5 = A1.idA2A2

A5.idA3A5 = A2.idA2A2

Thank you

Binesh Kumar

nup it did not workout gives null values

BineshKumar1
13-Aquamarine
(To:adev)

SELECT DISTINCT A0B.name ParentName,

                A0B.documentNumber ParentNumber,

                A2B.name ChildName,

                A2B.documentNumber ChildNumber

FROM            EPMDocument A0,

                EPMDocumentMaster A0B,

                EPMDocumentMaster A1,

                EPMDocument A2,

                EPMDocumentMaster A2B,

                EPMMemberLink A3

WHERE           (A0.idA3masterReference=A0B.idA2A2)

AND             (A2.idA3masterReference=A2B.idA2A2)

AND              ((A0B.name = 'ER00020039.asm'))

AND             ((A3.idA3B5 = A1.idA2A2)

AND              (A3.idA3A5 = A0.idA2A2)

AND           (A2.idA3masterReference = A1.idA2A2));

Try this. It worked on my system to get level 1 CAD structure.

Thank you

Binesh Kumar

It worked Thank ou so much Binesh

tanvisharma13
6-Contributor
(To:adev)

Hi, 

 

I am looking to do the same programatically. 

Can anyone pls suggest relevant API to do the same.

 

Thanks in Advance..

Announcements


Top Tags