terry01 Posted June 10, 2011 Share Posted June 10, 2011 (edited) Hi there all, I've got an old LISP since r14 days. can't use it anymore on newer ACAD versions onwards. can somebody troubleshoot it please. many thanks ;DW.LSP ;FUNCTION PROVIDED : D_DRW ;UCSET : UCS SET FOR PROJECT ; ;************************** (defun ucset (cor) (setq cor (cadr (trans cor 1 0))) (if (> cor 30) (command "ucs" "r" "ucs1") (command "ucs" "r" "ucs2")) );end defun ;*************************** (defun d_drw(e1 pt1 / ver corc) ;(ucset pt1) (setq corx1 -2000) (setvar "cmdecho" 0) (setq layer (cdr (assoc 8 (entget e1))) ; scale 10 ; dist 4 ; datum -5 );end setq ;(if (= "EGL" lay) (setq layer lay level 1)) ;(if (= "EXL" lay) (setq layer lay level 2)) (if (= "SL" lay) (setq layer lay level 3)) ;(if (= "FL" lay) (setq layer lay level 4)) ;(if (= "PGL" lay) (setq layer lay level 5)) (setq e1 (entnext e1)) ;set v1 to first vertext (setq ver 1) (while (and (setq v1 (entget e1)) (/= ver nil)) (setq ver (assoc 10 v1)) (setq e1 (entnext e1)) (if (/= ver nil) (progn (setq cor (trans (list (cadr ver) (caddr ver) 0) 0 1)) (if (/= cor corc) (d-dim cor)) (setq corc cor) );end progn );end if );Wend );end defun (defun cpl(e1 / entG) ;where e1 : entity name (setq lay (cdr (assoc 8 (entget e1))) entG (ssget "x" (list (cons 8 lay))) ) (if (= (cdr (assoc 0 (entget e1))) "LINE") (progn (command "pedit" e1 "y" "j" entG "" "x") (setq ent (entlast)) );end progn (progn (alert "Selected Entity Not a LINE") (exit) );end progn );end if );end defun (defun c:cp(/ ent) (setq ent (car (entsel "\nClick a Line"))) (cpl ent) ) (defun c:dw() (setq e1 (entsel "\nSelect line for Dimensioning ....") pt1 (cadr e1) e1 (car e1) ) ;(ucset pt1) (cpl e1) (d_drw ent pt1) (c:re) );end defun Edited June 10, 2011 by CADTutor Added CODE tags Quote Link to comment Share on other sites More sharing options...
BIGAL Posted June 10, 2011 Share Posted June 10, 2011 I am running lisps older than r14 no probs load into vlide and use the step by step debug to work out where it stops. download this guide www.Lee-mac.com/debugvlide its very helpfull thanks Lee. A couple of extras use the # to put your code in its own section rather than a long page and it would have helped if you pointed to where it stops in your code it can be difficult to work out what your program is actually doing and entering correct responces. Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted June 10, 2011 Share Posted June 10, 2011 ...download this guide www.Lee-mac.com/debugvlide its very helpfull thanks Lee. Thanks BigAl, appreciated. @terry01, as BigAl mentions, wrap your code in code tags, thus: [noparse] Your Code Here [/noparse] Quote Link to comment Share on other sites More sharing options...
Tharwat Posted June 10, 2011 Share Posted June 10, 2011 Lee , Something wrong with the link , says Not Found . Regards Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted June 10, 2011 Share Posted June 10, 2011 Sorry, should be: http://www.lee-mac.com/debugvlide.html Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.