I want to use CopyWithLink and Copy in XCAF documents, but I found that they are not working. Is this a bug?

I want to use CopyWithLink and Copy in XCAF documents, but I found that they are not working. Is this a bug?
Perhaps this API cannot be used in XCAF?
Here is my test code,in DRAWEXE

pload ALL
pyclinder pin 1 10
NewDocument D XCAF
XAddShape D pin
NewDocument Dcopy XCAF
CopyWithLink D 0:1 Dcopy0:1
Copy D 0:1 Dcopy0:1
DFBrowse Dcopy

Can anyone help me? Or give me some hints,
thanks!

Dmitrii Pasukhin's picture

Hello.

That command is rely on OCAF functionality. OCAF do not know nothing about XCAF. It is better to use special tool to copy.

Please check: https://github.com/Open-Cascade-SAS/OCCT/blob/495a6a642dbfcebd866a6d6f93...

Best regards, Dmitrii.

ye na's picture

thanks