return value of Block locked state

return value of Block locked state

jjat-wang
Advocate Advocate
734 Views
4 Replies
Message 1 of 5

return value of Block locked state

jjat-wang
Advocate
Advocate

I want to know if the block is locked.

Because the value can still be changed by the macro

 

P)CRT~B7]9Y9B)A)9]R}(N1.png

0 Likes
Accepted solutions (1)
735 Views
4 Replies
Replies (4)
Message 2 of 5

Anonymous
Not applicable
BOOL lockXmin=$widget('RoughBlock.LimitFrame.LockMinX').Value
BOOL lockXmax=$widget('RoughBlock.LimitFrame.LockMaxX').Value
BOOL lockXLen=$widget('RoughBlock.LimitFrame.LockLenX').Value
 
 
0 Likes
Message 3 of 5

Anonymous
Not applicable
Accepted solution
// Toggle block Xmin lock state
IF $widget('RoughBlock.LimitFrame.LockMinX').Value== 'TRUE' {
   EDIT BLOCK XMIN UNLOCK
} ELSE {
   EDIT BLOCK XMIN LOCK
}
0 Likes
Message 4 of 5

jjat-wang
Advocate
Advocate

thank you !!!

I always think that the state is only 0 and 1

and   widget    【ribbon.pattern.Draw.Instrument 】?

it is in ribbon ,how can i  return bool?

T[4B8H3J9G[VK6SFCAPV`EH.png

A]{AQBS4@W{5O%ZNWAWVEBT.png

0 Likes
Message 5 of 5

Anonymous
Not applicable
IF ($widget('Ribbon.Pattern.Draw.Instrument').Value == 'TRUE') {
    EDIT PATTERN ; INSTRUMENT OFF
} ELSE {
    EDIT PATTERN ; INSTRUMENT ON
}

Simple macro for see the appropriate commands/widget names:

MENUBARHELP DYNAMIC WIDGETNAMES
ECHO ON DCPDEBUG TRACE COMMAND ACCEPT
TOOLBAR COMMANDBAR RAISE

 

0 Likes