jesset Posted March 2, 2017 Posted March 2, 2017 Hello, I have more or less completed this little lisp and I can't figure out why it is skipping the first line after my 'if' statement. Basically, when you're in paperspace, it'll put your cursor into modelspace and you pick the point you want to annotate with a working point. For some reason my lisp won't go into modelspace. ;; This lisp creates a working point leader in paperspace ;; known bugs: the current selected multileader type will be the style of the working point ;; Rev 1 2017-03-02 ;; Created by J. Therrien (defun c:WorkingPoint (/ WorkingPoint Easting Northing Point PSPACEPOINT PSPACE TEXT TEXTPROPS COORD NorthingWP EastingWp) (if (and (= (getvar "TILEMODE") 0) (= (getvar "CVPORT") 1)) (;;then (command "_.mspace" );;end command (setq WorkingPoint (getpoint "\nWhere is Working Point?: ")) (setq Northing (rtos (cadr WorkingPoint) 2 1));;set "y" value of WorkingPoint to Northing (setq Easting (rtos (car WorkingPoint) 2 1));;set "x" value of WorkingPoint to Easting (setq NorthingWP (strcat "N: " Northing));; creates the proper formatting for the leader (setq EastingWP (strcat "E: " Easting));; creates the proper formatting for the leader (command "_.point" WorkingPoint);;end command (setq point (entlast));;set the workingpoint to point (command "_.chspace" point "" "");;this brings the workingpoint set in the modelspace to paperspace (setq pspacepoint (entget point));;get the properties for point (setq pspace (cdr (assoc 10 pspacepoint)));;find the x&y coords and set to pspace (setq anotbp (getpoint "\nSpecify leader basepoint: ")) (COMMAND "mTEXT" PSPACE "@30,-30" "WORKING POINT" NORTHINGWP EASTINGWP "" );;end command (setq text (entlast));;set mtext to variable text (setq textprops (entget text));;get the properties from text (setq coord (cdr (assoc 1 textprops)));;find the string properties and set to coord (command "_.mleader" pspace anotbp coord "_.erase" point text "" );;END COMMAND );;end then (alert "Make sure you are in paperspace to use this command");;else );;end if );;end defun Quote
jesset Posted March 2, 2017 Author Posted March 2, 2017 wow... that was dumb on my part, thanks! Quote
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.