LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Pick Point Method

I'm using the 3D picture control for my application, and I want to be able to select objects I have created, by clicking on them with the mouse.

I have tried using the  Pick Point Method of the 3D Picture control with no luck.

Has anyone managed to do this yet

Thanks

0 Kudos
Message 1 of 6
(2,937 Views)

Hi Jam.hall,

 

I have created an example file for you which can be found at the Ni community pages.  Please see the following link:

 

http://decibel.ni.com/content/docs/DOC-4958

 

If you have any questions or if this does not solve your issue please let me know.

 

Best regards,

 

John

------
John.P | Certified LabVIEW Architect | NI Alliance Member
0 Kudos
Message 2 of 6
(2,900 Views)

That's a pretty neat example.

 

A few minor nitpick points: Smiley Wink

  • Use the Decrement primitive rather than a Subtract and a constant of 1.
  • The constant of 100 for the Timeout doesn't really serve any purpose. There's no code in the Timeout case, so you're forcing the code to do absolutely nothing (and loop around) every 100 msec.
  • I would place the "Name" indicator outside the case structure and if there's no hit then write out an empty string so the user knows they have not hit on anything. 
0 Kudos
Message 3 of 6
(2,891 Views)

Thanks for the feedback:)

The subtract was left over from debugging, decrement is defiantly the better option!

I also agree it would make more sense to return a "No Object" message.

 

I have updated the example to reflect these changes.

 

The timeout case is actually to hide a little bug in the code 🙂

When the code first starts up two of the blocks do not appear....... and I can not work out why!  They only appear after the event structure has executed at least once so the timeout case was to force this execution.  As you rightly say there is no other purpose for it when using the event structure in this manor.

 

Again, thanks for the feedback 🙂

------
John.P | Certified LabVIEW Architect | NI Alliance Member
0 Kudos
Message 4 of 6
(2,884 Views)

John.P wrote:

Hi Jam.hall,

 

I have created an example file for you which can be found at the Ni community pages.  Please see the following link:

 

http://decibel.ni.com/content/docs/DOC-4958

 

If you have any questions or if this does not solve your issue please let me know.

 

Best regards,

 

John


 

How do you download the example at that link?  There is a section called Downloads.  It has the name of the file followed by the word "QUEUED".  But nothing there is selectable to be able to start a download.
0 Kudos
Message 5 of 6
(2,879 Views)

John.P wrote:

The timeout case is actually to hide a little bug in the code 🙂

When the code first starts up two of the blocks do not appear....... and I can not work out why!  They only appear after the event structure has executed at least once so the timeout case was to force this execution.  As you rightly say there is no other purpose for it when using the event structure in this manor.


I do not see this behavior. With the timeout constant removed all blocks are drawn. I'm running 8.6 in an XP virtual machine, but I don't think that would matter in this case. 

0 Kudos
Message 6 of 6
(2,877 Views)