LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Help with editing a 3D Mesh Object

Solved!
Go to solution

I am attempting to edit a 3D mesh object continuously but I am having some trouble with referencing the created mesh. I have attached screenshots of the .vi for reference.

On first call of the VI, it creates all the 3d objects and displays as expected. But on subsequent calls, the mesh object that I am trying to reference and edit the properties of does not appear to be referenced correctly. I am specifically talking about the object I have named "Cables". When I try to reference the mesh object by using the "To more specific class" function, it throws the following error. I am at a loss for how to properly reference the mesh and edit the parameters of it. Do I simply need to just delete the object and create a new one every time?

 

Error 1057 occurred at To More Specific Class in Create Motion Path 3.vi->Host-Main.vi

Possible reason(s):

LabVIEW: (Hex 0x421) Type mismatch: Object cannot be cast to the specified type.

Untitled1.png

Untitled2.png

0 Kudos
Message 1 of 5
(170 Views)

We cannot run or debug pictures. Create a simplified VI with all controls having typical defaults and attach it here.

(Use "save for previous, 2020 or below if you use a recent LabVIEW version)

Message 2 of 5
(94 Views)

Here is the VI saved as 2020 version. I have saved with some default values. The only value that you should need to alter for debugging is the "Current XYZ" control. If you can imagine that there is a payload hanging from 4 cables and when you change the current XYZ, the point should change and the cables will move with it. The first loops iteration works and displays as expected, but on subsequent iterations the reference to the "Cables" mesh throws an error.

Download All
0 Kudos
Message 3 of 5
(47 Views)
Solution
Accepted by topic author Zuol

Use a property node to get the Drawable reference. You can typecast that.

0 Kudos
Message 4 of 5
(36 Views)

Ahh Perfect! Thank you that was exactly what I was missing. I appreciate the help!

0 Kudos
Message 5 of 5
(31 Views)