Hi,
I would like to ask, how do I create a plane by code? I would like to create this plane before I am creating the whole model and be able to move it to this plane.
Thank you.
Martin
Hi,
I would like to ask, how do I create a plane by code? I would like to create this plane before I am creating the whole model and be able to move it to this plane.
Thank you.
Martin
you can assign the created plane directly to a declared treenode variable and move objects into it or create other objects in this reference.
Hi,
thanks for you answer, I would go with the way of creating the instance, I tried, but an error occurs. I am using this line of code:
Object plane = createinstance(library().find("?Plane"), model());
Do you know where the mistake is?
Thank you
That code is looking for a node called "Plane" under the library() node. There is no node called "Plane" under the library() node.
The Plane object shown in the Library view is an instance of the VisualTool class.
You could create an instance of that class directly:
createinstance(library().find("?VisualTool"), model());
or you could create a copy of a pre-configured instance (which is what happens when you drag in an object from the Visual section of the Library view):
createcopy(node("MAIN:/project/exec/globals/visuallibrary/Plane"), model());
18 People are following this question.
FlexSim can help you understand and improve any system or process. Transform your existing data into accurate predictions.
FlexSim is a fully 3D simulation software environment. FlexSim can be used to simulate any process in any industry.
FlexSim®, FlexSim Healthcare™, Problem Solved.®, the FlexSim logo, the FlexSim X-mark, and the FlexSim Healthcare logo with stylized Caduceus mark are trademarks of FlexSim Software Products, Inc. All rights reserved.
Privacy | Do not sell or share my personal information | Cookie preferences | Report noncompliance | Terms of use | Legal | © Autodesk Inc. All rights reserved