明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
分享 Lisp_操作Access数据库
雪山飞狐_lzh 2005-7-20 00:07
;(setq con (tls-ado-opencon (strcat (vla-get-path (vlax-get-acad-object)) "/tlscad/bin/house.mdb"))) ;(tls-ado-runtrans con "insert into houseinfo values('1','2','0001',67,'zh',23,'lzh',4,'')") ;(setq rs (tls-ado-openrs con "select * from houseinfo order by place,name,hid")) ;(tls-ado-fields-lis ...
998 次阅读|3 个评论
分享 冲针
spring 2005-7-19 20:00
(defun C:CTT () (setvar "cmdecho" 0) (setq ins (getpoint "\n请输入插入点:")) (setq d (getdist "\n请输入冲针直径:5.0")) (if (= d nil) (setq d 5.0) ) (setq h (getdist "\n请输入冲针长度:45.0")) (if (= h nil) &nb ...
850 次阅读|1 个评论
分享 program to insert vertex in simple polyline
Ea 2005-7-15 20:55
;;function to create list of polyline vertices---------------------------------- (defun getver (entnme / subent verlst vertex) (setq subent (entnext entnme)) ;_get first vertex (setq verlst '()) ;_setup ver ...
1387 次阅读|0 个评论
分享 Curve
Ea 2005-7-15 20:52
;;; curves.lsp ;;; (c) copyright 2002 by thomas gail haws ;;; curves.lsp extracts curve data and presents civil engineering curve tables in autocad. ;;; ;;; this program is free software under the terms of the ;;; gnu (gnu--acronym for gnu's not unix--sounds like canoe) ;;; general publi ...
1170 次阅读|0 个评论
分享 Edit & Copyatt
Ea 2005-7-15 20:50
;;; edit.lsp ;;; combined multiple sequential editor for ;;; blocks, attdefs, text, and dimensions. (defun c:edit (/ eg en et ss1) (setq ss1 (ssget)) (while (and ss1 (setq en (ssname ss1 0)) ) &nb ...
1125 次阅读|0 个评论
分享 Lisp调用VBS函数的子程(测试)
雪山飞狐_lzh 2005-7-13 22:03
调用格式:(tls-eval (tls-vbs) "msgbox(\"hello\",,\"TlsCad\")") (defun tls-vbs( / vbs) (vlax-put-property (setq vbs (vlax-create-Object "ScriptControl") ) "language"   ...
774 次阅读|0 个评论 热度 2
分享 一些常用的Lisp函数
Ea 2005-7-13 00:14
;;;; FAQ-CODE.LSP ;;;; Code from the comp.cad.autocad AutoLISP FAQ ;;;; (c) 1991-1997 Reini Urban ;;;; ;;;; This code may only be redistributed together with the FAQ document. ;;;; The FAQ may be freely redistributed in its entirety without ;;;; modification pro ...
4057 次阅读|6 个评论 热度 8
分享 文本操作函数
mccad 2005-7-10 21:49
;;文本操作函数 ;;作者:明经通道 mccad ;;将文本文件中的内容转换为列表 (defun Get_Txt(datfile / tmplst x fn) (setq fn (open datfile "r")) (while (setq x (read-line fn)) (setq tmplst(append tmplst(list x))) ) (close fn) tmplst ) ;;获取文本文件的 ...
4197 次阅读|4 个评论 热度 5
分享 图块重命名
mccad 2005-7-10 21:39
;;作者:John Uhden ;;功能:图块重命名 ;;参数:old:旧图块名称;new:重命名后的名称 ;;返回:重新命名后的图块 (defun renameblock (old new / ent) (and (= (type old)(type new) 'STR) (/= new old) (snvalid new 0) (setq en ...
1951 次阅读|1 个评论
分享 String Process
Ea 2005-7-10 12:38
(defun str-list(str / ls i) (setq i 1) (repeat(strlen str) (setq ls(cons(substr str i 1)ls)) (setq i(1+ i)) ) (reverse ls) ) Anwendungsbeispiel: (str-list "String") = ("S" "t" "r" "i" "n" "g") (defun str-list(str / ls ...
955 次阅读|0 个评论

小黑屋|手机版|CAD论坛|CAD教程|CAD下载|联系我们|关于明经|明经通道 ( 粤ICP备05003914号 )  
©2000-2023 明经通道 版权所有 本站代码,在未取得本站及作者授权的情况下,不得用于商业用途

GMT+8, 2024-4-29 12:53 , Processed in 0.420617 second(s), 8 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

返回顶部