LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

loading multiple vrml files into a scene

I'm trying to create a 3d scene of multiple aircraft.  I have some test aircraft models in vrml.  All the models load correctly when I only load one.  However, when I go to add a second one weird things happen.  Usually what happens is both objects appear in the scene, and can be moved/rotated independantly, but both will be the same model.  For example if plane 1 is a F18 and plane 2 is a lear jet...both planes become F18s, and the one that should be the lear has its textues all messed up.  Has anyone worked through a similiar issue?
0 Kudos
Message 1 of 3
(2,729 Views)
tiemanj-

Sounds like you;ve hit the same issue dsecribed in this knowledbase article:

http://digital.ni.com/public.nsf/websearch/1D7CDB5D8E834C3B862571E4005FBDD3?OpenDocument

Try the steps listed there and let us know if it helps.

Xaq
Applications Engineer
National Instruments
0 Kudos
Message 2 of 3
(2,718 Views)
Excellent - I just did what you suggested and at first glance it appears to work.  Need to do a little more testing to verify.  FYI - while trying to figure it it on my own, it appears that the problem is in the "Model Mgr Core" vi right above the edit.  When it gets called with the "Add Model" option, it depends on a call to "first call" function to see if it should clear its model history.  It does this when I load the first model, but since it has now been called, it won't clear on any additonal calls.  Since it won't clear, the first model is still in the array.  If I call 2 aircraft with 9 objects each (call them A and B) the array first is:
A0, A1, A2...A8
and after the second call it becomes
A0, A1, A2...A8, B0, B1....B8
and it was just using the first [number of objects in second call] as objects 0 through n as the children of the second object.  The fix described just appears to tell the program to start at the proper index.
0 Kudos
Message 3 of 3
(2,710 Views)