autoCAD 的lsp小程式加载不了
fun886
fun886 Lv.7
2013年01月05日 15:52:30
只看楼主

本人一直用的autoCAD 的lsp小程式换了电脑之后,加载不了请教高人指点

本人一直用的autoCAD 的lsp小程式换了电脑之后,加载不了
请教高人指点
免费打赏
fun886
2013年01月05日 15:56:29
2楼
命令栏中输入AP
然后加载LSP
先是说加载成功,然后一按关闭
命令栏就“指令: ; 錯誤: 載入失敗:”

我新电脑是WIN7的,之前是XP的,请各位高人指教!!
回复
小小顽童
2013年01月07日 22:51:27
3楼
试试以管理员身份运行
回复
fits
2013年01月09日 23:10:41
4楼
把程序发上来,给你看看怎么回事
回复
fits
2013年01月09日 23:11:07
5楼
把程序发上来,给你看看怎么回事
回复
fun886
2013年01月12日 11:58:14
6楼
用administrator把CAD重新裝一次了還是不行
現上傳附件
回复
fun886
2013年01月12日 12:01:17
7楼
指令: ap
APPLOAD CL.LSP 成功載入。


指令: ; 錯誤: 載入失敗: "D:/fok/TOOL/快捷键/lsp2008-04-15/CL.LSP"
回复
fits
2013年01月13日 12:12:07
8楼
(command "line" m1 m2 "")
(princ)

;;; --------------------------------------------------------------------------;

打开文件,在最后一行(princ)后加“)”即 (princ)) ,保存,然后重新加载。
回复
fun886
2013年01月16日 11:39:48
9楼
按楼上做了
;;; --------------------------------------------------------------------------;
;;; CL.LSP
;;; Copyright (C) 1990 by Autodesk, Inc.
;;;
;;; Permission to use, copy, modify, and distribute this software and its
;;; documentation for any purpose and without fee is hereby granted.
;;;
;;; THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY.
;;; ALL IMPLIED WARRANTIES OF FITNESS FOR ANY PARTICULAR PURPOSE AND OF
;;; MERCHANTABILITY ARE HEREBY DISCLAIMED.
;;;
;;; By Simon Jones Autodesk Ltd , London March 1987
;;;
;;; --------------------------------------------------------------------------;
;;; DESCRIPTION
;;;
;;; This macro constructs a pair of center lines through the
;;; center of a circle. The lines are put on a layer "CL".
;;;
;;; --------------------------------------------------------------------------;

(defun clerr (s)
(if (/= s "Function cancelled") ; If an error (such as CTRL-C) occurs
(princ (strcat "\nError: " s)) ; while this command is active...
)
(command "UCS" "P") ; Restore previous UCS
(setvar "BLIPMODE" sblip) ; Restore saved modes
(setvar "GRIDMODE" sgrid)
(setvar "HIGHLIGHT" shl)
(setvar "UCSFOLLOW" sucsf)
(command "LAYER" "S" clay "")
(command "undo" "e")
(setvar "CMDECHO" scmde)
(setq *error* olderr) ; Restore old *error* handler
(princ)
)

;;; --------------------------- Main Program ---------------------------------;

(defun C:CL (/ olderr clay sblip scmde sgrid shl sucsf e cen rad d ts xx)
(setq olderr *error*
*error* clerr)
(setq scmde (getvar "CMDECHO"))
(command "undo" "group")
(setq clay (getvar "CLAYER"))
(setq sblip (getvar "BLIPMODE"))
(setq sgrid (getvar "GRIDMODE"))
(setq shl (getvar "HIGHLIGHT"))
(setq sucsf (getvar "UCSFOLLOW"))
(setvar "CMDECHO" 0)
(setvar "GRIDMODE" 0)
(setvar "UCSFOLLOW" 0)
(setq e nil
xx "Yes")
(setq ts (tblsearch "LAYER" "CL"))
(if (null ts)
(prompt "\nCreating new layer - CL. ")
(progn
(if (= (logand 1 (cdr (assoc 70 ts))) 1)
(progn
(prompt "\nLayer CL is frozen. ")
(initget "Yes No")
(setq xx (getkword "\nProceed? : "))
(if (= xx "Yes")
(command "LAYER" "T" "CL" "")
)
)
)
)
)
(if (= xx "Yes")
(progn
(while (null e)
(setq e (entsel "\nSelect arc or circle: "))
(if e
(progn
(setq e (car e))
(if (and (/=
(cdr (assoc 0 (entget e))) "ARC")
(/= (cdr (assoc 0 (entget e))) "CIRCLE")
)
(progn
(prompt "\nEntity is a ")
(princ (cdr (assoc 0 (entget e))))
(setq e nil)
)
)
)
)
)
(command "UCS" "e" e)
(setq cen (trans (cdr (assoc 10 (entget e))) e 1))
(setq rad (cdr (assoc 40 (entget e))))
(prompt "\nRadius is ")
(princ (rtos rad))
(initget 7 "Length")
(setq d (getdist "\nLength/ : "))
(if (= d "Length")
(progn
(initget 7)
(setq d (getdist cen "\nLength: "))
)
(setq d (+ rad d))
)
(setvar "BLIPMODE" 0)
(setvar "HIGHLIGHT" 0)
(command "LAYER" "M" "CL" "")
(command "LINE" (list (car cen) (- (cadr cen) d) (caddr cen))
(list (car cen) (+ (cadr cen) d) (caddr cen)) ""
)
(command "CHANGE" "l" "" "P" "LT" "CENTER" "")
(command "LINE" (list (- (car cen) d) (cadr cen) (caddr cen))
(list (+ (car cen) d) (cadr cen) (caddr cen)) ""
)
(command "CHANGE" "l" "" "P" "LT" "CENTER" "")
(command "LAYER" "S" clay "")
)
)
(command "UCS" "P") ; Restore previous UCS
(setvar "BLIPMODE" sblip) ; Restore saved modes
(setvar "GRIDMODE" sgrid)
(setvar "HIGHLIGHT" shl)
(setvar "UCSFOLLOW" sucsf)
(command "undo" "e")
(setvar "CMDECHO" scmde)
(setq *error* olderr) ; Restore old *error* handler
(princ)
)
(defun c:ml (/ a a1 a2 b c e f g c1 e1 f1 pt3 pt4 m1 m2)
(setq a (ssget))
(setq b (ssname a 0))
(setq c (entget b))
(setq e (cdr (assoc 10 c)))
(setq f (cdr (assoc 11 c)))
(setq g (ssname a 1))
(setq c1 (entget g))
(setq e1 (cdr (assoc 10 c1)))
(setq f1 (cdr (assoc 11 c1)))
(defun shen (a1 a2)
(list (/ (+ (car a1) (car a2)) 2)
(/ (+ (cadr a1) (cadr a2)) 2)
)
)
(setq m1 (shen e e1))
(setq m2 (shen f f1))
(command "line" m1 m2 "")
(princ))

;;; --------------------------------------------------------------------------;

可惜还是不行啊

APPLOAD CL.LSP successfully loaded.
Command: ; error: LOAD failed:
回复
fun886
2013年01月16日 11:45:26
10楼
求高人继续指点!!!!
回复
fun886
2013年01月16日 11:51:28
11楼
同样是WIN7家用进阶版本,
在我同事的电脑就可以用!!!还不是ADMIN管理员的CAD都可以
回复

相关推荐

APP内打开