How do I check for "ncprogram.UserParameters"

How do I check for "ncprogram.UserParameters"

per.soerensen2EV6F
Advocate Advocate
336 Views
2 Replies
Message 1 of 3

How do I check for "ncprogram.UserParameters"

per.soerensen2EV6F
Advocate
Advocate

How do I check for "entity('ncprogram';'').UserParameters.Z_Precision" in mac ?

I want something like :

IF NOT entity_exists(('ncprogram';'').UserParameters.Z_Precision) {

 // activate Z_Precision varmup on V33i in nc program
EDIT USERPAR ncprogram ; TYPE 'String'
EDIT USERPAR ncprogram ; NAME "Z_Precision"
CREATE USERPAR ncprogram '$ncprog_name'
}
EDIT PAR "entity('ncprogram';'').UserParameters.Z_Precision" 'YES'
Print ${entity('ncprogram';'').UserParameters.Z_Precision}

 

I cant get this to work

0 Likes
Accepted solutions (1)
337 Views
2 Replies
Replies (2)
Message 2 of 3

rafael.sansao
Advisor
Advisor
Accepted solution
DIALOGS MESSAGE OFF
ENTITY $ncp = $entity("ncprogram","")
IF NOT Member($ncp.UserParameters._keys, "Z_Precision") {
	EDIT USERPAR ncprogram $ncp NAME "Z_Precision"
	EDIT USERPAR ncprogram $ncp TYPE 'String'
	CREATE USERPAR ncprogram $ncp
}
$ncp.UserParameters.Z_Precision = "Yes"
DIALOGS MESSAGE ON

Rafael Sansão

OptiNC - www.optinc.tech

EESignature

0 Likes
Message 3 of 3

per.soerensen2EV6F
Advocate
Advocate

Thanks this is perfect 🙂

0 Likes