EDA365电子论坛网
标题:
cline to shape 帮我看下代码,无法转换
[打印本页]
作者:
王开鑫55
时间:
2017-1-5 17:19
标题:
cline to shape 帮我看下代码,无法转换
line 删除了,shape转化不成功
axlCmdRegister("cline2shape" 'LCB_cline_to_shape ?cmdType "interactive"
?doneCmd 'LCB_Done ?cancelCmd 'LCB_Cancel)
procedure(LCB_cline_to_shape()
let( ()
axlSetFindFilter(?enabled list("noall" "LINES" "clines") ?onButtons list("noall" "LINES" "clines"))
LCBpopup = axlUIPopupDefine( nil (list
list("Done" 'LCB_Done)
list("Undo" 'LCB_unDo)
list("Cancel" 'LCB_Cancel)
list("MENU_SEPARATOR" nil)
list("Set Dynamic" "bDynamic = t")
list("Set Statics" "bDynamic = nil")
list("MENU_SEPARATOR" nil)
list("EndCapType = OCTAGON" "sEndCapType = 'OCTAGON")
list("EndCapType = ROUND" "sEndCapType = 'ROUND")
list("EndCapType = SQUARE" "sEndCapType = 'SQUARE")
))
axlUIPopupSet(LCBpopup)
LCBstartMark = axlDBTransactionStart()
notdone = t
bDynamic = t
sEndCapType = 'OCTAGON
while(notdone
lclines = axlGetSelSet(axlSelect(?prompt "Select Clines to convert to a shape."))
if(lclines then
foreach(clinedbid lclines ;clinedbid = car(lclines)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
net = clinedbid->net->name
layer = clinedbid->layer
;******************
unless(clinedbid->isEtch
bDynamic = nil
)
axlUIWPrint(layer "** now layer is layer. **")
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
polydbid = axlPolyFromDB(clinedbid ?endCapType sEndCapType)
if(polydbid then
axlDeleteObject(clinedbid)
if(cadr(polydbid) then
axlDBCreateShape(cadr(polydbid) t layer net))
)
)
)
)
axlDBTransactionCommit(LCBstartMark)
));end let
procedure(LCB_unDo()
let( ()
if(! axlDBTransactionOops(LCB_mark) then
axlUIWPrint(nil "-- Nothing Left To Undo. --")
else
axlUIWPrint(nil "-- Replacing Clines. --")
); endif
axlClearSelSet()
)); end let procedure
procedure(LCB_Cancel()
let( ()
axlUIWPrint(nil "** Cancelled Program. **")
;axlDBTransactionRollback(LCB_mark)
notdone = nil
axlClearSelSet()
axlCancelEnterFun()
)); end let procedure
procedure(LCB_Done()
let( ()
axlUIWPrint(nil "- Done -")
axlDBTransactionCommit(LCB_mark)
notdone = nil
axlCancelEnterFun()
)); end let and procedure
欢迎光临 EDA365电子论坛网 (https://bbs.eda365.com/)
Powered by Discuz! X3.2