ControlDefinition check if is already active before execute

ControlDefinition check if is already active before execute

mirkomaga
Contributor Contributor
293 Views
1 Reply
Message 1 of 2

ControlDefinition check if is already active before execute

mirkomaga
Contributor
Contributor

Bye,

I would like to know if it is already active before Execute.

 

 

    Dim oCm As CommandManager
    Set oCm = ThisApplication.CommandManager
    
    Dim oControl As ControlDefinition
    Set oControl = oCm.ControlDefinitions.Item("AppLinePropertiesToggleCmd")
    
    oControl.Execute

 

mirkomaga_0-1643016649042.png

 

 

0 Likes
Accepted solutions (1)
294 Views
1 Reply
Reply (1)
Message 2 of 2

nedeljko.sovljanski
Advocate
Advocate
Accepted solution

Hi,

 

You must be in sketch env. and than property Pressed will show button state

nedeljkosovljanski_0-1643019297064.png

That means you can run your code if you are in sketch drawing env and you will see how pressed prop. changes vaalue depends is button pressed or not.