Copy&Replace Adaptive Component

Copy&Replace Adaptive Component

c_hoppen
Advocate Advocate
185 Views
3 Replies
Message 1 of 4

Copy&Replace Adaptive Component

c_hoppen
Advocate
Advocate

Hello,

I would like to replace components in an assembly that contain adaptive elements. Replacing the components themselves is straightforward, but I can't find a way to replace the references to the adaptive elements. The Copy function in the assembly environment can do this (see lower left screenshot).

adaptivities.png

I have not found any information about this in the API documentation or in this forum.


Is there a trick to it? Unfortunately, I'm afraid this is not possible via the API, as the context menu of adaptive elements does not offer any options either.

adaptivities2.png

Regards,

Christoph

0 Likes
186 Views
3 Replies
Replies (3)
Message 2 of 4

C_Haines_ENG
Collaborator
Collaborator

To clarify, the Assembly "Component -> Copy" function does what you want?

0 Likes
Message 3 of 4

c_hoppen
Advocate
Advocate

Yes. The lower left screenshot shows the result after "Copy Components":

c_hoppen_0-1750402235418.png

Apparently, the function uses an internal mechanism that is not available via the API.

0 Likes
Message 4 of 4

C_Haines_ENG
Collaborator
Collaborator

You could actually copy the file, and then rename it, and add it back into the assembly.

 

I believe it would retain its references, just not its constraints. You can use System.IO to copy files.

 

System.IO.File.Copy("FilePathToCopy","FilePathOfCopied")
0 Likes