For all issues regarding the Forums use, please, refer to the Forum Rules.

Our Solutions

Need professional assistance?
Consider our:

Support Offerings


Need to speed up your development?
Have a look at our:

Samples & Tools


Need some functionality extending standard OCCT capabilities?
Check out our:

Adv. Components

Related pages

Retrieve part number from Shape

Halima Hali's picture


I'm new on Open cascade and I need really your help

I'm working with stp files of assemblies and need to ind a way to retrieve from a shape the associated part 

I find that it's possible to use OCAF to retrieve labels name but I can not retrieve all information .

For example , with a stp file containing these two lines :

#5=PRODUCT('M1021021021','ADAP-ASSY','',(#2)) ;
#26=PRODUCT('M1256985621','ADAP-PART','',(#2)) ;

This code :

entry = TCollection_AsciiString() TDF_Tool.Entry(lab, entry)

handle_n = Handle_TDataStd_Name()

lab.FindAttribute(TDataStd_Name_GetID(), handle_n)

n = handle_n.GetObject()

if n: return n.Get().PrintToString()

returns ADAP_ASSY or ADAP-PART , what I need is more the first String M1021021021 or M1256985621

Thanks in advance for your help