03-03-2010 08:27 AM - edited 03-03-2010 08:34 AM
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.
03-04-2010 04:27 AM
03-04-2010 07:26 AM - edited 03-04-2010 07:27 AM
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,
03-04-2010 08:07 AM - edited 03-04-2010 08:12 AM
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.
03-07-2010 01:40 PM
03-03-2011 02:24 AM
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.