08-22-2018 10:19 AM
Hi everyone,
I am creating a scene object in one actor and want to pass that to its parent actor when the creating actor shuts down. While I can display the object, I cannot access any of its child objects (Find Object fails with error 1055). Also, it is recognized as an invalid refnum.
When I try the same thing with a subVI instead of an actor, everything works fine.
Am I missing something here? This seems like a bug, albeit a very weird one.
Cord
Solved! Go to Solution.
08-22-2018 10:33 AM
All LabVIEW references are "owned" by the top-level VI that created them (and all AF Actors are separate top-level VIs). When a top-level VI stops, it cleans up all its references.
BTW, you should use "3D picture" in your question, as few people will know what a "scene object" is.
08-23-2018 03:13 AM
Thanks for your reply! I tried to be specific with the scene object, but maybe too much so.
That explains why the reference is invalid, but the fact that I can still display it in a 3D picture threw me off.
Ok, so in order to display it in the calling actor I will have to recreate the picture. I will see if it is possible to "flatten" a 3d picture.
When is a new top-level VI created? I suppose start asynchronous call will do that. Anything else?
08-23-2018 05:05 AM
@cordm wrote:
Ok, so in order to display it in the calling actor I will have to recreate the picture. I will see if it is possible to "flatten" a 3d picture.
Why not just not shutdown the scene-creating actor till you are finished with the scene? It seems a bit strange (and not very actor-model-like) to be doing this.
@cordm wrote:
When is a new top-level VI created? I suppose start asynchronous call will do that. Anything else?
Async call, plus the older "Run VI" method, plus just running something manually from the run arrow.
08-23-2018 06:28 AM
If you want a short-lived helper Actor to populate the scene for you, then you need to pass a scene reference to it for it to work with instead of letting it create its own. This way, you get around the "Who owns the scene" problem when shutting down the helper.