LISP worked in 2012, but not f
Hopefully someone can help me.The LISP in question was already created when I started at my company 8 years and I have no idea how to read/create them.Of course that person is no longer here and nobody else has any knowledge of LISPs.It allows you to measure a distance using multiple points, rounds the value up to the nearest 10, inserts a specific block and enters the measurement into the attribute field. In 2012 and all the way back to 2007 it worked as it is supposed to.It works as it always has until the end, in 2014 it brings up the 'enter attributes' window.I have attached our block we use and the LISP is below.
Thank you for any help anyone can provide.
Victor
(defun c:WW () (setq PT01 (getpoint "\Start Point: ") CALC010 SCALE01 (getvar "dimscale") ) (while (setq PT02 (getpoint PT01 "\nNext Point:")) (if PT02 (setq DIST01 (distance PT01 PT02) CALC02 (+ DIST01 CALC01) CALC01 CALC02 PT01 PT02 CALC03 (* 10 (+ 1 (fix (/ (fix CALC01) 10)))) ) ) ) (setq PT03 (getpoint "\nInsertion Point ")) (if PT03 (command "insert" "Block-Ftg-WW.dwg" PT03 SCALE01 SCALE01 pause CALC03) ) (setq CALC03 0) (princ "\n WW FOOTAGE COMPLETE") (princ))
Block-Ftg-WW.dwg Its probably the "insert" like this it will pop the dialouge box try the "_insert" I think Lee-mac on his web site has description about ._command _command etc. I had the same issue with one of my lisps.
Set ATTDIA system variable to 0 This ... ?
(defun c:test (/ *error* d p 1p s f v) ;; Tharwat 06.May.2014 ;; (defun *error* (x) (if v (mapcar 'setvar '(attreq attdia) v) ) (princ) ) (cond ((and (not (tblsearch "BLOCK" (setq f "Block-Ftg-WW"))) (not (setq f (findfile "Block-Ftg-WW.dwg")))) (alert "Can not find Drawing < Block-Ftg-WW.dwg > !!") ) ((setq d 0. p (getpoint "\n Specify Point: ") ) ) ) (if p (while (setq 1p (getpoint p "\n Next Point :")) (setq d (+ d (distance p 1p)) p 1p ) ) ) (if (and d (setq p (getpoint "\n Insertion Point "))) (progn (setq v (mapcar 'getvar '(attreq attdia))) (mapcar 'setvar '(attreq attdia) '(1 0)) (command "_.-insert" f "_none" p (setq s (getvar 'DIMSCALE)) s pause (rtos (* 10 (+ 1 (fix (/ (fix d) 10)))) 2) ) ) ) (*error* nil) (princ)) meracl - That was the ticket.Thank you very much.That saved us a lot of headaches.
Tharwat and BIGAL - Thank you for your help too. You're welcome .
And hope the routine running as needed . Please read the Code Posting Guidelines and use Code Tags for your Code. I fixed your original post for you this time. You are welcome.
Im glad that, solved your problem.
页:
[1]