LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Hotkey vs. VI scripting cleanup differences?

Solved!
Go to solution

Hi. I have fair amount of VIs, I need to clean up. The BDs are small and the automatic cleanup (ctrl+u) gives surprisingly good results so I wanted to automate the process using VI scripting like this:

1984_0-1688474989988.png

 

To my surprise the scripting method and the ctrl+u hotkey produces a different result:

Scripting:

1984_1-1688475056756.png

Ctrl+U

1984_2-1688475082344.png

I have the feeling that the scripting ignores the cleanup settings in the options menu... wondering if anybody has an idea how to fix this. (besides simulating keypresses, which I'd rather no going into)

 

thx!

 

 

 

Message 1 of 4
(781 Views)
Solution
Accepted by 1984

Hi,

 

The TopLevelDiagram class has a cleanup method that takes options:

raphschru_0-1688482182978.png

 

These are not exactly the same as in the LabVIEW options, so you'll have to figure out their values.

 

Regards,

Raphaël.

Message 2 of 4
(748 Views)

Thanks mate!

0 Kudos
Message 3 of 4
(723 Views)

Just a little help to "figure out" the LabVIEW settings:

  • Use the library located here to read the LabVIEW INI C:\Program Files\National Instruments\LabVIEW 2021\resource\dialog\lvconfig.llb
  • Check the LabVIEW INI for the tokens. Unfortunately I could not find a documentation of the tokens, but look for ones beginning with autoLayout. They should be self explanatory with that cluster.
0 Kudos
Message 4 of 4
(544 Views)