LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Screen Coordinates of a VI inside subpanel

Solved!
Go to solution

Hi,

 

I have a problem with the function Convert Panel to Screen Coordinates. If a VI is inside a SubPanel, this function return wrong Coordinates. Otherwise this function works properly.

 

The attachments explains the error.

Download All
0 Kudos
Message 1 of 8
(4,022 Views)

Olá Bruno.

 

Os resultados que obtive com o seu programa deram iguais. Poderia me explicar melhor sobre as coordenadas que você gostaria que aparecesse?

 

 

 

Diogo

Engenharia de Aplicação

National Instruments/Brazil

Diogo Aparecido
Applications Engineer II
National Instruments Brazil



0 Kudos
Message 2 of 8
(3,995 Views)

Olá,

 

 

No meu caso os resultados não são os mesmos.

 

O objetivo deste código é exibir VI3 sempre na mesma posição, logo abaixo do botão. Isso acontece quando pressiono o

botão Menu e da mesma forma era para acontecer  quando pressionasse OK em VI2, que está inserida no subpanel.

Vamos lá, se eu rodo VI2 fora do subpanel VI3 aparece na posição correta, logo abaixo do botão. Agora, se VI2 está no subpanel a janela de VI3 aparece numa posição que não seria a esperada.

 

Bruno.

0 Kudos
Message 3 of 8
(3,991 Views)

Olá Bruno.

 

Estou mandando os passos para você seguir.

 

Solução:

 

            Aperte com o botão direito em cima da SubVI periodo.

            Selecione o ícone SubVI node setup.

            Escolha a opção que  você achar melhor, pois com todas elas funcionam.

            Fim.

 

 

 

 

Atenciosamente.

 

 

 Diogo

 

Engenharia de Aplicação.

National Instruments/Brazil

Diogo Aparecido
Applications Engineer II
National Instruments Brazil



0 Kudos
Message 4 of 8
(3,963 Views)

Hi,

 

I dont have any problem to show or hide this VI. My problem is wich that VI3 shows in wrong position of the screen when i call VI3 with VI2 and this not happen when i call VI3 with VI1 or VI2 is not inserted in VI1.

 

 

 VI3 Called by VI1

 VI3 called by VI1

 

 VI3 called by VI2 inserted in VI1

VI3 called by VI2 inserted in VI1

 

 VI3 called by VI2 not inserted in VI1

 VI3 called by VI2 not inserted in VI1

 

 

 

I hope explain this problem correctly.

 

 

 

Bruno

 

0 Kudos
Message 5 of 8
(3,952 Views)
Solution
Accepted by topic author bruno_costa

Hi Bruno,

 

I did a test using a different approach and it looks likes ok for me, try to substitute your V2.vi by the attached file.

 

Regards,

Osvaldo Santos
Message 6 of 8
(3,895 Views)

HI,

 

 

Great, you give to me a workaround.

 

But, the other way would also be correct?

 

 

Thanks

 

Bruno

0 Kudos
Message 7 of 8
(3,879 Views)
Hi Bruno,

 To be true I think that there are different behaviour to the method CvtPanelToScreenCoords when using it inside a subpanel, I didn´t understand what and way, so I decided to use the workarrond proposed. But I didn't find  any thing about use this method inside a subpanel.

 
Regards,
Osvaldo Santos
0 Kudos
Message 8 of 8
(3,869 Views)