怎样编写lsp程序
想编写一个LSP程序用于CAD程序,带箭头引线编号像①②③的,本人不会lsp语言哪位好心人能帮忙啊!!!!谢谢啦!!!!!!!可以,好强大!!!!但是我还想要带箭头引线然...
想编写一个LSP程序用于CAD程序,带箭头引线编号像①②③的,本人不会lsp语言
哪位好心人能帮忙啊!!!!谢谢啦!!!!!!!
可以,好强大!!!!但是我还想要带箭头引线然后编号的,你能加进去吗,先万分感谢这位朋友!!!!!! 展开
哪位好心人能帮忙啊!!!!谢谢啦!!!!!!!
可以,好强大!!!!但是我还想要带箭头引线然后编号的,你能加进去吗,先万分感谢这位朋友!!!!!! 展开
1个回答
展开全部
(defun c:nnn() ;*
(setq ColorCode (getint "\n请输入字体颜色代码(红1/黄2/绿3/青4/蓝5/紫6/白7):")) ;*
(command "-layer" "m" "编号" "c" "7" " " "") ;*
(command "-style""编号""romans""0""0.5""0""n""n""n") ;*
(command "osmode" "0") ;*
(command "_color" ColorCode) ;*
(setq Radius (getdist "\n请输入圆圈半径: ")) ;*
(setq Num (getint "\n请输入起始编号:")) ;*
(while (> ColorCode 0) ;*
(setq CenterPt (getpoint "\n请指定下一个点: ")) ;*
(if CenterPt ;*
(progn ;*
(command "circle" CenterPt Radius) ;*
(command "text" "j" "m" CenterPt (* 1.2 Radius) "0" Num) ;*
(setq Num (+ Num 1)) ;*
) ;*
(setq ColorCode 0) ;*
) ;*
)
(command "-layer" "m" "0" "c" "7" " " "")
(command "-style""standard""宋体""0""1""0""n""n""n")
(command "color" "bylayer")
(command "osmode" "699")
(princ)
)
;;;*******************************************
;;;************以下为新建圆形视口程序*************
(defun c:wc()
(setq CenPt (getpoint "\n请指定圆心: "))
(setq SenPt (getpoint CenPt "\n请指定圆周点: "))
(command "-vports" "p" SenPt "a" "ce" CenPt "a" 359.99999 SenPt "cl")
(princ)
)
;;;*******************************************
(defun c:tt()
(command "undo" "1" )
(princ)
)
(prompt "\n<<NNN>>")
(prin1)
看这个行不行。把代码复制到记事本,扩展名改为*.lsp 打开CAD,工具-->AutoLISP-->加载 加载保存的lsp文件 然后在命令行打nnn 就可以使用了》
能用的话记得加分哦 o(∩_∩)o...
(setq ColorCode (getint "\n请输入字体颜色代码(红1/黄2/绿3/青4/蓝5/紫6/白7):")) ;*
(command "-layer" "m" "编号" "c" "7" " " "") ;*
(command "-style""编号""romans""0""0.5""0""n""n""n") ;*
(command "osmode" "0") ;*
(command "_color" ColorCode) ;*
(setq Radius (getdist "\n请输入圆圈半径: ")) ;*
(setq Num (getint "\n请输入起始编号:")) ;*
(while (> ColorCode 0) ;*
(setq CenterPt (getpoint "\n请指定下一个点: ")) ;*
(if CenterPt ;*
(progn ;*
(command "circle" CenterPt Radius) ;*
(command "text" "j" "m" CenterPt (* 1.2 Radius) "0" Num) ;*
(setq Num (+ Num 1)) ;*
) ;*
(setq ColorCode 0) ;*
) ;*
)
(command "-layer" "m" "0" "c" "7" " " "")
(command "-style""standard""宋体""0""1""0""n""n""n")
(command "color" "bylayer")
(command "osmode" "699")
(princ)
)
;;;*******************************************
;;;************以下为新建圆形视口程序*************
(defun c:wc()
(setq CenPt (getpoint "\n请指定圆心: "))
(setq SenPt (getpoint CenPt "\n请指定圆周点: "))
(command "-vports" "p" SenPt "a" "ce" CenPt "a" 359.99999 SenPt "cl")
(princ)
)
;;;*******************************************
(defun c:tt()
(command "undo" "1" )
(princ)
)
(prompt "\n<<NNN>>")
(prin1)
看这个行不行。把代码复制到记事本,扩展名改为*.lsp 打开CAD,工具-->AutoLISP-->加载 加载保存的lsp文件 然后在命令行打nnn 就可以使用了》
能用的话记得加分哦 o(∩_∩)o...
AiPPT
2024-09-19 广告
2024-09-19 广告
随着AI技术的飞速发展,如今市面上涌现了许多实用易操作的AI生成工具1、简介:AiPPT: 这款AI工具智能理解用户输入的主题,提供“AI智能生成”和“导入本地大纲”的选项,生成的PPT内容丰富多样,可自由编辑和添加元素,图表类型包括柱状图...
点击进入详情页
本回答由AiPPT提供
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询