broncos15 Posted November 4, 2015 Share Posted November 4, 2015 So I was able to create a lisp routine to allow the user to move a feature line without changing the elevation of feature line by messing with the osnapz value. Unfortunately I am having issues with creating a lisp routine for when the user selects a feature line and then wants to drag a PI to another place. The way I am trying to make it so that the user can type in command at the command line that changes their settings. Then, they would grab the feature line and be able to drag it wherever they wanted. After that, they would type another command that would reset their settings. I have tried messing with the osnapz, but that only applies for things outside the stretch command unfortunately. I know that I can change the point filters to only .xy, but this still requires the user to enter in the elevation. Does anyone have any other ideas of how I could achieve this? Quote Link to comment Share on other sites More sharing options...
broncos15 Posted November 4, 2015 Author Share Posted November 4, 2015 (edited) I ended up just making a lisp to toggles the osnapz. What is interesting is that having osnapz off works only part of the time for moving the feature lines by stretching. Does anyone know why this doesn't always work? Edited November 5, 2015 by broncos15 Quote Link to comment Share on other sites More sharing options...
broncos15 Posted November 5, 2015 Author Share Posted November 5, 2015 So I have realized that turning osnapz off only works about half the time when grabbing a feature line and dragging the PI to another location but keeping the current elevation of the PI. My solution was to create the following code: (defun c:zo (/ oldecho) (setq oldecho (getvar "cmdecho")) (setvar "cmdecho" 1) (command ".xy" pause "@") (setvar "cmdecho" oldecho) (princ) ) The user would then hit 'zo after grabbing the feature line and when they are trying to move a PI. Unfortunately, it doesn't seem to work correctly because it still wants a z value. Does anyone know why this wouldn't work correctly? Quote Link to comment Share on other sites More sharing options...
broncos15 Posted November 5, 2015 Author Share Posted November 5, 2015 So I found a code online that I have been trying to use within the grip edits, but it doesn't move it correctly. The code is: (DEFUN C:RXY (/ PT1 PT1x PT1y PT2 PT2x PT2y TRANXY) (PRINT) (SETQ PT1 (GETPOINT "First reference point xy: ")) (PRINT) (SETQ PT2 (GETPOINT "Second reference point xy: ")) (setq PT1x (CAR PT1) PT1y (CADR PT1) PT2x (CAR PT2) PT2y (CADR PT2) ) (SETQ TRANXY (LIST (- PT2x PT1x) (- PT2y PT1y) 0.0)) (SETQ TRANXY (trans TRANXY 0 0)) ) Quote Link to comment Share on other sites More sharing options...
KevinH Posted September 6, 2023 Share Posted September 6, 2023 Broncos15, did you figure out a solution to this? I have been wanting something like this for years. I do know you can use the .xy transparent command then type the "@" symbol and the elevation will stay the same. It would be nice if I could start a lisp and drag PI's all over and it keep the same z elevations at every command. 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.