AutoLisp 源代码 实用程序1.docx

上传人:b****5 文档编号:29329598 上传时间:2023-07-22 格式:DOCX 页数:18 大小:16.93KB
下载 相关 举报
AutoLisp 源代码 实用程序1.docx_第1页
第1页 / 共18页
AutoLisp 源代码 实用程序1.docx_第2页
第2页 / 共18页
AutoLisp 源代码 实用程序1.docx_第3页
第3页 / 共18页
AutoLisp 源代码 实用程序1.docx_第4页
第4页 / 共18页
AutoLisp 源代码 实用程序1.docx_第5页
第5页 / 共18页
点击查看更多>>
下载资源
资源描述

AutoLisp 源代码 实用程序1.docx

《AutoLisp 源代码 实用程序1.docx》由会员分享,可在线阅读,更多相关《AutoLisp 源代码 实用程序1.docx(18页珍藏版)》请在冰豆网上搜索。

AutoLisp 源代码 实用程序1.docx

AutoLisp源代码实用程序1

(defunc:

1(/1a1b1c1dchklaydovavx)

(setvar"OSMODE"1024)

(setqchklay(tblsearch"layer""FL"))

(if(nullchklay)

(command"layer""n""FL""c""161""FL""")

(setqva(getvar"lunits"))

(if(=va2)

(progn

(setqdo20000)

(SETQVX1))

(if(=va4)

(progn

(setqdo800)

(SETQVX0.03937))

(setq1a'(000))

(setq1b(polar1a0do))

(setq1c(polar1b(*pi0.5)do))

(setq1d(polar1a(*pi0.5)do))

(command"pline"1a1b1c1d1a"")

(command"chprop"(entlast)"""la""FL""")

(command"insert""STRBLOCK"'(000)VXVX0)

(setvar"OSMODE"1279)

(prin1)

(defunc:

dxff(/ent)

(setqa1(car(entsel)))

(setqb1(entgeta1(list"*")))

;;;(defunc:

e(/cmd_entcmd_selcmd_no)

;;;(setqcmd_ent(cadr(ssgetfirst)))

;;;(cond((=nilcmd_ent)

;;;(setqcmd_sel(ssget))

;;;(setqcmd_no(sslengthcmd_sel))

;;;(command"_.erase"cmd_sel"")

;;;(alert(strcat"Total****"

;;;(rtoscmd_no20)

;;;"****Deleted"

;;;"\nTotal****"

;;;(rtoscmd_no20)

;;;"****Deleted"

;;;"\nTotal****"

;;;(rtoscmd_no20)

;;;"****Deleted"

;;;)

;;;)

;;;)

;;;((/=nilcmd_ent)

;;;(setqcmd_no(sslengthcmd_ent))

;;;(command"_.erase")

;;;(alert(strcat"Total****"

;;;(rtoscmd_no20)

;;;"****Deleted"

;;;"\nTotal****"

;;;(rtoscmd_no20)

;;;"****Deleted"

;;;"\nTotal****"

;;;(rtoscmd_no20)

;;;"****Deleted"

;;;)

;;;)

;;;)

;;;)

;;;(princ)

;;;)

;***************************************************************************************************************************************************

;;;(defunc:

m(/cmd_entcmd_selcmd_nocmd_distcmd_ptcmd_pt1)

;;;(setqcmd_ent(cadr(ssgetfirst)))

;;;(if(=nilcmd_ent)

;;;(setqcmd_sel(ssget))

;;;(setqcmd_selcmd_ent)

;;;)

;;;(setqcmd_no(sslengthcmd_sel))

;;;(princ(strcat(rtoscmd_no20)"FoundByElvis"))

;;;(command"move"

;;;cmd_sel

;;;""

;;;(setq

;;;cmd_pt(getpoint

;;;"\nSpecifybasepointor[Displacement]:

"

;;;)

;;;)

;;;pause

;;;)

;;;(setqcmd_pt1(getvar"lastpoint"))

;;;(setqcmd_dist(distancecmd_ptcmd_pt1))

;;;(alert(strcat"Total****"

;;;(rtoscmd_no20)

;;;"****Moved"

;;;"\n"

;;;"\nStartPoint****("

;;;(rtos(carcmd_pt)24)

;;;","

;;;(rtos(cadrcmd_pt)24)

;;;","

;;;(rtos(caddrcmd_pt)24)

;;;")****"

;;;"\n"

;;;"\nEndPoint****("

;;;(rtos(carcmd_pt1)24)

;;;","

;;;(rtos(cadrcmd_pt1)24)

;;;","

;;;(rtos(caddrcmd_pt1)24)

;;;")****"

;;;"\n"

;;;"\nDistance****"

;;;(rtoscmd_dist24)

;;;"****"

;;;)

;;;)

;;;

;;;(Propak_Str_Elviscmd_sela"MOVE")

;;;(princ)

;;;)

 

;;;(defunc:

co(/cmd_copyentcmd_distcmd_entcmd_entlastcmd_nocmd_ptcmd_pt1cmd_sel)

;;;(SETQA(GETVAR"OSMODE"))

;;;(setqcmd_ent(cadr(ssgetfirst)))

;;;(if(=nilcmd_ent)

;;;(setqcmd_sel(ssget))

;;;(setqcmd_selcmd_ent)

;;;)

;;;(setqcmd_no(sslengthcmd_sel))

;;;(princ(strcat(rtoscmd_no20)"FoundByElvis"))

;;;(setqcmd_pt

;;;(getpoint

;;;"\nSpecifysecondpointor[Array]:

"

;;;)

;;;)

;;;(whilet

;;;(setqcmd_copyent(ssadd))

;;;(setqcmd_entlast(entlast))

;;;(command"copy"cmd_sel""cmd_ptpause)

;;;(setqcmd_pt1(getvar"lastpoint"))

;;;(setqcmd_dist(distancecmd_ptcmd_pt1))

;;;

;;;(while(if(=cmd_entlastnil)nil(setqcmd_entlast(entnextcmd_entlast)))

;;;(if(member(cdr(assoc0(entgetcmd_entlast)))

;;;'("LINE""CIRCLE""LWPOLYLINE"

;;;"TEXT""3DSOLID""ELLIPSE"

;;;"ARC""DIMENSION""LEADER"

;;;"POLYLINE""MTEXT""INSERT"

;;;)

;;;)

;;;(setqcmd_copyent(ssaddcmd_entlastcmd_copyent))

;;;))

;;;

;;;(alert(strcat"Total****"

;;;(rtoscmd_no20)

;;;"****Copy"

;;;"\n"

;;;"\nStartPoint****("

;;;(rtos(carcmd_pt)24)

;;;","

;;;(rtos(cadrcmd_pt)24)

;;;","

;;;(rtos(caddrcmd_pt)24)

;;;")****"

;;;"\n"

;;;"\nEndPoint****("

;;;(rtos(carcmd_pt1)24)

;;;","

;;;(rtos(cadrcmd_pt1)24)

;;;","

;;;(rtos(caddrcmd_pt1)24)

;;;")****"

;;;"\n"

;;;"\nDistance****"

;;;(rtoscmd_dist24)

;;;"****"

;;;)

;;;)

;;;(Propak_Str_RevTextcmd_copyent)

;;;(Propak_Str_Elviscmd_copyenta"COPY")

;;;

;;;)

;;;

;;;(princ)

;;;)

 

;;;(defunc:

mi(/cmd_copyentcmd_distcmd_entcmd_entlastcmd_methodcmd_nocmd_ptcmd_pt1cmd_selcmd_st)

;;;(setqcmd_ent(cadr(ssgetfirst)))

;;;(if(=nilcmd_ent)

;;;(setqcmd_sel(ssget))

;;;(setqcmd_selcmd_ent)

;;;)

;;;(setqcmd_no(sslengthcmd_sel))

;;;(princ(strcat(rtoscmd_no20)"FoundByElvis"))

;;;(setqcmd_pt

;;;(getpoint

;;;"\nSpecifysecondpointor[Array]:

"

;;;)

;;;)

;;;(setqcmd_copyent(ssadd))

;;;(setqcmd_entlast(entlast))

;;;(command"mirror"cmd_sel""cmd_ptpause"N")

;;;(setqcmd_pt1(getvar"lastpoint"))

;;;(setqcmd_dist(distancecmd_ptcmd_pt1))

;;;

;;;(setqcmd_st(strcase(getstring"\nErasesourceobjects?

[Yes/No]:

")))

;;;(if(=cmd_st"Y")

;;;(progn

;;;(setqcmd_method"MOVE")

;;;(command"erase"cmd_sel"")

;;;)

;;;(setqcmd_method"COPY")

;;;

;;;)

;;;(alert(strcat"Total****"

;;;(rtoscmd_no20)

;;;"****Mirror"

;;;"\n"

;;;"\nStartPoint****("

;;;(rtos(carcmd_pt)24)

;;;","

;;;(rtos(cadrcmd_pt)24)

;;;","

;;;(rtos(caddrcmd_pt)24)

;;;")****"

;;;"\n"

;;;"\nEndPoint****("

;;;(rtos(carcmd_pt1)24)

;;;","

;;;(rtos(cadrcmd_pt1)24)

;;;","

;;;(rtos(caddrcmd_pt1)24)

;;;")****"

;;;"\n"

;;;"\nDistance****"

;;;(rtoscmd_dist24)

;;;"****"

;;;)

;;;)

;;;(while(setqcmd_entlast(entnextcmd_entlast))

;;;(if(member(cdr(assoc0(entgetcmd_entlast)))

;;;'("LINE""CIRCLE""LWPOLYLINE""TEXT""3DSOLID"

;;;"ELLIPSE""ARC""DIMENSION""LEADER""POLYLINE""MTEXT""INSERT")

;;;)

;;;(setqcmd_copyent(ssaddcmd_entlastcmd_copyent))

;;;)

;;;)

;;;(Propak_Str_RevTextcmd_copyent)

;;;(Propak_Str_Elviscmd_copyentacmd_method)

;;;

;;;(princ)

;;;)

 

;;;(defunc:

s(/cmd_entcmd_selcmd_nocmd_distcmd_ptcmd_pt1)

;;;(setqcmd_ent(cadr(ssgetfirst)))

;;;(if(=nilcmd_ent)

;;;(setqcmd_sel(ssget))

;;;(setqcmd_selcmd_ent)

;;;)

;;;(setqcmd_no(sslengthcmd_sel))

;;;(princ(strcat(rtoscmd_no20)"FoundByElvis"))

;;;(command"stretch"

;;;cmd_sel

;;;""

;;;(setq

;;;cmd_pt(getpoint

;;;"\nSpecifybasepointor[Displacement]:

"

;;;)

;;;)

;;;pause

;;;)

;;;(setqcmd_pt1(getvar"lastpoint"))

;;;(setqcmd_dist(distancecmd_ptcmd_pt1))

;;;(alert(strcat"Total****"

;;;(rtoscmd_no20)

;;;"****Moved"

;;;"\n"

;;;"\nStartPoint****("

;;;(rtos(carcmd_pt)24)

;;;","

;;;(rtos(cadrcmd_pt)24)

;;;","

;;;(rtos(caddrcmd_pt)24)

;;;")****"

;;;"\n"

;;;"\nEndPoint****("

;;;(rtos(carcmd_pt1)24)

;;;","

;;;(rtos(cadrcmd_pt1)24)

;;;","

;;;(rtos(caddrcmd_pt1)24)

;;;")****"

;;;"\n"

;;;"\nDistance****"

;;;(rtoscmd_dist24)

;;;"****"

;;;)

;;;)

;;;(Propak_Str_Elviscmd_sela"STRETCH")

;;;(princ)

;;;)

 

;============

(defunPropak_Str_Elvis(Elvis_SelaElvis_method/

Elvis_rnoElvis_data

Elvis_TElvis_typ

Elvis_coloElvis_colo_bk

Elvis_xdata

(if(=a"!

1")

(progn

(regapp"PROPAK_ELVIS")

(setqElvis_rno0)

(repeat(sslengthElvis_Sel)

(setqElvis_data(entget(ssnameElvis_SelElvis_rno)))

(if(=nil(assoc-3(entget(ssnameElvis_SelElvis_rno)(list"*"))))

(setqElvis_Tt)

(setqElvis_Tnil)

(setqElvis_typ(cdr(assoc0Elvis_data)))

(setqElvis_colo(cdr(assoc62Elvis_data)))

(if(=Elvis_colonil)

(setqElvis_colo_bk256)

(setqElvis_colo_bkElvis_colo)

(cond((and(or(=Elvis_typ"LINE")

(=Elvis_typ"CIRCLE")

(=Elvis_typ"LWPOLYLINE")

(=Elvis_typ"TEXT")

(=Elvis_typ"3DSOLID")

(=Elvis_typ"ELLIPSE")

(=Elvis_typ"ARC")

(=Elvis_typ"POLYLINE")

(=Elvis_typ"MTEXT")

Elvis_T

(setqElvis_xdata

(list'-3

(cons"PROPAK_ELVIS"

(list'(1002."{")

(cons1000(rtosElvis_colo_bk20))

(cons1000Elvis_method)

'(1002."}")

(entmod(appendElvis_data(list(cons6210))(listElvis_xdata)))

(setqElvis_rno(1+Elvis_rno))

(defunPropak_Str_RevText(RevText_Sel/dcl_idddentrevtext_datarevtext_namerevtext_rnorevtext_typ)

(setqRevText_rno0)

(repeat(sslengthRevText_Sel)

(setqRevText_data(entget(ssnameRevText_SelRevText_rno)))

(setqRevText_typ(cdr(assoc0RevText_data)))

(cond((or(=RevText_typ"TEXT")

(=RevText_typ"MTEXT")

(setqent(cdr(assoc1RevText_data)))

(setqdcl_id(load_dialog"dde"))

(new_dialog"dde"dcl_id)

(set_tile"dimt"ent)

(action_tile"accept""(getdata)(done_dialog1)")

(action_tile"cancle""(done_dialog)")

(setqdd(start_dialog))

(if(=dd1)

(entmod(subst(cons1ent)(assoc1RevText_data)RevText_data)))

((=RevText_typ"INSERT")

(if(="SUPTAG"(cdr(assoc2RevText_data)))

(progn

(setqRevText_name

(entnext(ssnameRevText_SelRevText_rno))

(setqRevText_data(entgetRevText_name))

(setqent(cdr(assoc1RevText_data)))

(setqdcl_id(load_dialog"dde"))

(new_dialog"dde"dcl_id)

(set_tile"dimt"ent)

(action_tile"accept""(getdata)(done_dialog1)")

(action_tile"cancle""(done_dialog)")

(setqdd(start_dialog))

(if(=dd1)

(entmod(subst(cons1ent)

(assoc1RevText_data)

RevText_data

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 初中教育 > 理化生

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1