PDMS调试小工具

有时候,我们想在 pdms 设计选择树中快速游走,并且获取对所选对象的一些信息或者做一些操作。
我们可以使用 PDMS 的 track 命令

track.gif

jmodebug.pmlfrm


setup form !!jmodebug DIALOG DOCKing top resize
title    |jmo debug|
TRACK '$!!cdcntrack' call |!this.track()|
toggle    .lock   'Enable/Disable Tracking current element' at x0.5   ymax callback '!this.lock()'
textpane .macro anchor top + left + bottom + right  at x0 ymax+0.1 width 45 height 10 
member .filename  is STRING
member .tracking  is BOOLEAN

exit

define method .jmodebug()
    !this.lock.val = true
    !this.tracking = true
endmethod

define method .track()
    if(!this.tracking) then
        !commands = !this.macro.val
        do !cmd values !commands
            $!cmd
            handle any
                $p $!!error.Text  $!!error.Line $!!error.command
            endhandle
        enddo
    endif
endmethod

define method .lock()
    !this.tracking  = !this.lock.val 
endmethod


$.




最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容