tlawson Posted May 18, 2009 Share Posted May 18, 2009 Hi all When using the presspull command it prompts you to click inside a bounded area. I would like to select the area by typing in a coordinate. Is this possible because I have noticed the coordinate system seems to have a mind of its own when this command is activated. Any ideas? Quote Link to comment Share on other sites More sharing options...
tlawson Posted May 18, 2009 Author Share Posted May 18, 2009 Have part answered my own question. yes you can type in a coordinate to select the bounded area but....For some reason the coordinate system does not seem to match the world coordinate system. I'm using AutoCAD 2010. Has any one else found the same problem? Quote Link to comment Share on other sites More sharing options...
Hachi Posted December 21, 2020 Share Posted December 21, 2020 (edited) Hi!!! I have the same problem. I solved it by navigating the crosshair into world coordinate 0,0,0 by mouse, then call the command via typing presspull and than the two coordinate system is the same. I working now to find a simple solution to this, but sience now I find non. Best Regards, Hachi Edited December 21, 2020 by Hachi Quote Link to comment Share on other sites More sharing options...
Hachi Posted December 21, 2020 Share Posted December 21, 2020 On 5/18/2009 at 9:20 PM, tlawson said: Have part answered my own question. yes you can type in a coordinate to select the bounded area but....For some reason the coordinate system does not seem to match the world coordinate system. I'm using AutoCAD 2010. Has any one else found the same problem? Hi!!! I have the same problem. I solved it by navigating the crosshair into world coordinate 0,0,0 by mouse, then call the command via typing presspull and than the two coordinate system is the same. I working now to find a simple solution to this, but sience now I find non. Best Regards, Hachi Quote Link to comment Share on other sites More sharing options...
Hachi Posted December 21, 2020 Share Posted December 21, 2020 (edited) I wrote a program that pulls out the closed polygon that is around the given point (I hope it helps): NOTE: All polygons must be in the plane xy (Z coordinate must be 0) for program to work. This is one downside. (defun c:pp(/ PPPOINT PTX PTXX PTXXX PTY PTYY PTZ PTZZ X X0 Y Y0 YO Z Z0) (command "zoom" "_all"); This is necessary so that both the polygon to be pulled out and the current position of the mouse are in the same window while a program is running. (setq pt (grread 3)) (setq ptxxx (cdr pt)) (setq ptxx (car ptxxx)) (setq ptx (car ptxx)) (setq ptyy (cdr ptxx)) (setq pty (car ptyy)) (setq ptzz (cddr ptxx)) (setq ptz (car ptzz)); The red block collects x, y and z coordinates from your cursor/crosshair location in a moment. I think there is much more effective way to do this but it works! (setq x0 (getreal "Type in the X coordinate:")) (setq y0 (getreal "Type in the y coordinate:")) (setq z0 (getreal "Type in the z coorindate:")) ; The green block reads your World coordinates of your point! Important Note: The inside of the polygon must contain the point that the program requests in this line. The polygon must be closed! (setq x (- x0 ptx)) (setq y (- y0 pty)) (setq z (- z0 ptz)); The purple block converts the cursor coordinates to world coordinates (setq PPpoint (list x y z)); This line insert the converted coordinates to a variable calld PPpoint (command "_presspull" PPpoint); This line extrude the closed polygone. You have to decide the extrusion value! (princ) ) I attached the program below. To run the program, you have to load the ,,PP.LSP" file in ACad. This video show you how to do that: - After loading the file you have to type in a command bar pp to run the program. The Cad file have to have closed polygon with Z=0 to work properly. PP.LSP Edited December 21, 2020 by Hachi Quote Link to comment Share on other sites More sharing options...
tlawson Posted December 21, 2020 Author Share Posted December 21, 2020 Many thanks for your answer. I can't remember why I posted the question after all this time. I guess I was probably trying to construct a Script file. The thing to do when writing a script file is to alter the following variable osnapcoord Controls whether coordinates entered on the command line will override running object snaps 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.