LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

3D Picture - Select part from object

Dear fellow labview users,

 

I've a project where we use the 3D Picture control to visualize what is happening.

 

The problem we have is as followed. In solidworks we have an assembly drawing. We have exported this to vrml and we can also read this with labview and let the 3D Model show in the 3D Picture control. Now if I want to select a part of the assembly in labview it returns the error "Invoke Node in <name>.vi". 

 

I use the same code as in the example 

 

http://zone.ni.com/devzone/cda/tut/p/id/3170#toc4

 

 

My question is... what is wrong?

 

Logicaly it seems something is wrong with the vrml file. However as said I can read the WHOLE vrml and display it in the 3D Picture I just can't display a part of the assembly. I think there must be done something in solidworks so it gets defined that parts can be accessed by the getObject property. The question is where you define something like that in Solidworks? 

 

ps. I tried the same thing with also a very simpel assembly (2 boxes) but still doesn't work. 

Message Edited by WouterG on 03-03-2010 08:34 AM
0 Kudos
Message 1 of 6
(5,224 Views)
No one :(?
0 Kudos
Message 2 of 6
(5,175 Views)

Dear Wouter,

 

Thank you for your post on our webforum. If you choose the method object count, how many objects are detected? I could only find a example file with single objects. Can you post the file you are trying to read?

The example works perfect for single object files or if I add two wrl object together (open two wrl files) there is no problem.

 

Best regards,

Message Edited by ninlmartijn on 03-04-2010 07:27 AM
Martijn S
Applications Engineer
NI Netherlands
0 Kudos
Message 3 of 6
(5,152 Views)

This .zip file contains my testcase. It has the following files:

- part1.SLDPRT (Solidworks part 1)

- part2.SLDPRT (Solidworks part 2)

- assem.SLDASM (Solidworks assembly)

- assem.wrl (The generated VRML file from the assem.SLDASM file)

- test.vi (The Labview VI) 

 

(The assembly is just a very easy one of 2 boxes. LxWxH; 20*20*15 and 50*50*15) 

 

Hope you can help. 

 

And too reply your message ninlmartijn. The object count method returns 1. So yes it doesn't wonder me that I can only see 1 object (the whole assembly) but what I want to know is, is what is wrong with the VRML file. I tried al sort of things inside solidworks to define the objects but none worked out. But the tutorial, http://zone.ni.com/devzone/cda/tut/p/id/3170#toc4, says nothing about that. It only says that you just use an assembly and that you than can use the get object method to get certain parts.  

 

-edit- I'm sure your example would work but that isn't the same as descriped in the tutorial. You load 2 VRML's and then just add them together followed up by selecting a part. I want just to load 1 VRML and select 1 part, as in the example.

Message Edited by WouterG on 03-04-2010 08:12 AM
0 Kudos
Message 4 of 6
(5,144 Views)
:smileysad:
0 Kudos
Message 5 of 6
(5,073 Views)

I dont know if I am on time but still open your VRML file as a Text (Using Notepad). Check for the name of the Parts.

 

It will be like DEF Base Transform { where Base is name of my part in VRML FIle.

 

If you have all your parts in VRML file you should be fine, in case if you dont have anything before Transform Just write your Part name and try. 

 

You can verify it by using Find Object.vi and calling that particular in string name.

 

I hope this helps !!!!

 

Let me if I can be helpful.

 

 

-------------------------------------------------------------------------------------------------------------------------------
Thanks & Regards,
Kunal Raithatha.
CTD - CLAD (I wish I can take off that A, and maybe use it later to replace D 🙂

Easy Tip :- "To copy an image to a VI icon, drag the image file and place it on the icon
located in the upper right corner of the front panel or block diagram" ...If you know any
more reply back.
-------------------------------------------------------------------------------------------------------------------------------
0 Kudos
Message 6 of 6
(4,494 Views)