EDGCNTRL / EDGPACKET / EDGPICKPACKET / EDGPOSITIONDATA

I am trying to get the position of a single picked point through the edgcntrl command

It's not so clear for me and seems complex and also the fact that it continues with the code and doesn't pause like the pick command. Maybe there is a workaround for the last comment.

In it's most basic form :

!packet             = object EDGPACKET()
!packet.action  = 'put command here to find postion picked'
!!edgCntrl.add(!packet)

How do I extract the position of the pick ? I see many programs putting this syntax in : !this.return[1]

How do i halt the program while I pick something ?

If the program can't be halted, the above syntax can only ever be at the end of a program. Doesn't seem right. I am definitely missing something.

Parents
  • It is all described in Software Customisation Reference Manua - Event Driven Graphics

    But basically, you define your edgPacket and then hand it over to the edgCntrl (=Event control system), which, t will call the action-callback you defined in the packet after the picking is completed. Thus you "cannot" use edgPacket in a "run-all-lines-to-end" macro-style,

    Using pick command

    form.MethodA()
    
    var !p pick
    
    !!ce.position = !p[1].dbref().position
    
    endmethod

    Using edgPacket

    form.MethodA()
    !packet             = object EDGPACKET()
    
    !packet.action  = '!!form.MethodB(!this.return[1])
    !!edgCntrl.add(!packet)
    endmethod
    form.MethoB(!posData is EDGEPOSITIONDATA)
    !!ce.position = !posData.position
    endmethod

    Or something like that :)

  • Hi. Thanks for that.
    I will have a better look shortly

Reply Children
No Data