Object.create() for user library object

Object.create() for user library object

chanykE2WUT
Collaborator Collaborator
628 Views
3 Replies
Message 1 of 4

Object.create() for user library object

chanykE2WUT
Collaborator
Collaborator

[ FlexSim 24.0.1 ]

Hi I am not sure if Object.create() can be used for object from the user library. Anyone can advise me? From the forum, it looks like createinstance or createcopy is still the approach.


David

0 Likes
Accepted solutions (1)
629 Views
3 Replies
Replies (3)
Message 2 of 4

FelixMoehlmann
Collaborator
Collaborator
Accepted solution

As far as I'm aware Object.create() can only create objects that are present in the library folder of the main tree and does so by referencing their class name.

capture1.png

Apart from the node location, an object from a user library will likely just be a customized version of some default object and as such still belong to the same class.

So no, I don't think Object.create() can be used for user library objects.

It could however be used of objects that are part of custom modules that implement their own class.

0 Likes
Message 3 of 4

chanykE2WUT
Collaborator
Collaborator
@Felix Möhlmann Thanks

David

0 Likes
Message 4 of 4

jason_lightfoot_adsk
Autodesk
Autodesk
Some information on copying objects here.
0 Likes