Jump to content

Combine two indicators in one?


san_gr

Recommended Posts

Hey everyone,

I'm not sure if this can be done at all but i'll give it a shot.

I want to create a very unique indicator :rolleyes:. I have made two custom indicators and I want to combine them. Some of you may remember that I was building an elevator simulation. To simulate the elevator movement, I customized a vertical pointer slide (called "elevator shaft") and to animate the elevator doors, I customized a vertical progress bar (called "door").

Is there a way to fix the second indicator to the first one so that the whole "door" moves up or down?

PS. I have attached a simple vi too see how these 2 indicators are going to be used.

demo1.vi

Link to comment

I'm pretty sure you can't do what you want, but you can control the placement of the "door" using the Top property by creating a property node for the door control. It requires some code, but it's the same as far as the end user is concerned. If you want to hide the code, you can make an XControl, but it's probably not worth the effort.

Link to comment

I'm pretty sure you can't do what you want, but you can control the placement of the "door" using the Top property by creating a property node for the door control. It requires some code, but it's the same as far as the end user is concerned. If you want to hide the code, you can make an XControl, but it's probably not worth the effort.

I see...

Could you go into some more details about how to control the placement of the "door"?

Link to comment

I didn't look at your code, but you said the door was a numeric control, so all you need to do is right click it, select Create>>Property Node>>Position>>Top, which will drop a property node on the BD already linked to the control and with the top property selected. Now you can simply poll the shaft for its value (in a loop) and use that to calculate what the position of the door should be. If you want to get a little more fancy, you can even get the position, scale and size info of the shaft and use that to dynamically detemine where the door should go relative to the shaft, but that's already more complicated.

Link to comment
  • 2 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.