LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Get Diagram Disable Symbols

Hi,

Is there anyway to get the Project: Diagram Disable Symbols programatically i.e,using some nodes.
Thanks in advance.

0 Kudos
Message 1 of 11
(2,694 Views)

It seems to be a hot topic. See for example this and this.

Those posts are pretty recent. Next time, try to search yourself into the forum.

Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
0 Kudos
Message 2 of 11
(2,659 Views)

@pincpanter wrote:

It seems to be a hot topic. See for example this and this.

Those posts are pretty recent. Next time, try to search yourself into the forum.


Those threads are about how to set them. Question here is how to get them. I don't think the answer is in those threads.

 

This is where to go: Programmatic-read-access-to-project-symbols.

0 Kudos
Message 3 of 11
(2,643 Views)

wiebe@CARYA  ha scritto:

@pincpanter wrote:

It seems to be a hot topic. See for example this and this.

Those posts are pretty recent. Next time, try to search yourself into the forum.


Those threads are about how to set them. Question here is how to get them. I don't think the answer is in those threads.

 

This is where to go: Programmatic-read-access-to-project-symbols.


You are right, although I don't see much point in getting them, as usually they are indirectly accessed by means of conditional disable structures.

Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
0 Kudos
Message 4 of 11
(2,637 Views)

@pincpanter wrote:

wiebe@CARYA  ha scritto:

@pincpanter wrote:

It seems to be a hot topic. See for example this and this.

Those posts are pretty recent. Next time, try to search yourself into the forum.


Those threads are about how to set them. Question here is how to get them. I don't think the answer is in those threads.

 

This is where to go: Programmatic-read-access-to-project-symbols.


You are right, although I don't see much point in getting them, as usually they are indirectly accessed by means of conditional disable structures.


I saw that coming. Smiley LOL

 

A CDS causes a code change and potential SCC change. Although you can minimize this to just one VI, reading the string can bring this down to 0.

 

It also allows fancier utilization then switching a case. You could compose your own project symbols, and for instance store coordinates in them. That makes them more a global string then a switch.

 

So, although the 'proper' use case for a project symbol is to use it in a conditional disable structure, you can use (misuse? abuse?) them for other things.

0 Kudos
Message 5 of 11
(2,632 Views)

How about reading the Project XML file?

 

I created a dummy project and added 2 conditional disable symbols in it.  I found them near the top of the XML file.  Under Property Name "CCSymbols"

 

<Project Type="Project" LVVersion="18008000">
	<Property Name="CCSymbols" Type="Str">Test1,A;Test2,B;</Property>
	<Property Name="NI.LV.All.SourceOnly" Type="Bool">false</Property>
	<Property Name="NI.Project.Description" Type="Str"></Property>
	<Item Name="My Computer" Type="My Computer">
		<Property Name="IOScan.Faults" Type="Str"></Property>
		<Property Name="IOScan.NetVarPeriod" Type="UInt">100</Property>
		<Property Name="IOScan.NetWatchdogEnabled" Type="Bool">false</Property>
		<Property Name="IOScan.Period" Type="UInt">10000</Property>
		<Property Name="IOScan.PowerupMode" Type="UInt">0</Property>
		<Property Name="IOScan.Priority" Type="UInt">9</Property>
		<Property Name="IOScan.ReportModeConflict" Type="Bool">true</Property>
		<Property Name="IOScan.StartEngineOnDeploy" Type="Bool">false</Property>
		<Property Name="server.app.propertiesEnabled" Type="Bool">true</Property>
		<Property Name="server.control.propertiesEnabled" Type="Bool">true</Property>
		<Property Name="server.tcp.enabled" Type="Bool">false</Property>
		<Property Name="server.tcp.port" Type="Int">0</Property>
		<Property Name="server.tcp.serviceName" Type="Str">My Computer/VI Server</Property>
		<Property Name="server.tcp.serviceName.default" Type="Str">My Computer/VI Server</Property>
		<Property Name="server.vi.callsEnabled" Type="Bool">true</Property>
		<Property Name="server.vi.propertiesEnabled" Type="Bool">true</Property>
		<Property Name="specify.custom.address" Type="Bool">false</Property>
		<Item Name="Untitled 3.vi" Type="VI" URL="../Untitled 3.vi"/>
		<Item Name="Dependencies" Type="Dependencies"/>
		<Item Name="Build Specifications" Type="Build"/>
	</Item>
</Project>

  Of course the project needs to have been saved for them to show up.

0 Kudos
Message 6 of 11
(2,604 Views)

Reading the file can be dangerous, the file might not have been saved.

 

You can get those strings from the project root. Get the tag called "CCSymbols" (IIRC, OTOMH), and you'll get the current symbols.

Message 7 of 11
(2,500 Views)

wiebe@CARYA wrote:

Reading the file can be dangerous, the file might not have been saved.

 


Yes.  I did say that in my message, last line,  that the project file needs to be saved.

0 Kudos
Message 8 of 11
(2,492 Views)

@RavensFan wrote:

wiebe@CARYA wrote:

Reading the file can be dangerous, the file might not have been saved.

 


Yes.  I did say that in my message, last line,  that the project file needs to be saved.


Ah. I see. But what would be the up side of reading the file then?

0 Kudos
Message 9 of 11
(2,487 Views)

I'm not suggesting there was an upside.  Just that there still seemed to be negativity about the responses received, so I was suggesting another alternative.

0 Kudos
Message 10 of 11
(2,463 Views)