.xy point filter tool for grip editing

.xy point filter tool for grip editing

Neilw_05
Mentor Mentor
3,293 Views
11 Replies
Message 1 of 12

.xy point filter tool for grip editing

Neilw_05
Mentor
Mentor

I have numerous lines with 3D elevations. I need to grip edit the vertices to new locations without changing their elevations. OSNAPZ does not work when grip editing. Thus I need to use the .xy point filter. I am looking for a custom command to eliminate all the inputs for the filtering. Ideally I want to select a grip, press a key, then drag and snap to the new location, all without changing the elevation.

 

I am sure this is a simple macro but I need guidance. TIA. 

Neil Wilson (a.k.a. neilw)
AEC Collection/C3D 2024, LDT 2004, Power Civil v8i SS1
WIN 10 64 PRO

http://www.sec-landmgt.com
0 Likes
Accepted solutions (1)
3,294 Views
11 Replies
Replies (11)
Message 2 of 12

cadffm
Consultant
Consultant

OSNAPZ does working when grip editing!

So if osnapz=1 is a solution for you (you know for what is this setting and how to works?), use it.

 

Please test it again and if you're wrong, and osnapz = 1 does not fit your requirement

(because the points are not all in a plane you've previously set the ucs to)

it should possible to create a menumacro which use Stretch-command and a small part of magic.

Or for a fullversion, perhaps a tool.

Sebastian

0 Likes
Message 3 of 12

Kent1Cooper
Consultant
Consultant
Accepted solution

@Neilw_05 wrote:

.... I need to grip edit the vertices to new locations without changing their elevations. OSNAPZ does not work when grip editing. Thus I need to use the .xy point filter. I am looking for a custom command to eliminate all the inputs for the filtering. Ideally I want to select a grip, press a key, then drag and snap to the new location, all without changing the elevation.

.... 


You can use the (NXY) function  in NextXYZ.lsp, or 'NXY as a transparent command  in NextXYZ-C.lsp, both available >here<.  See the description there to understand the usages and the difference between them [and the fact that the files define the same kind of operations for any  coordinate or combination of two coordinates].  Either can be put into a Tool Palette macro or assigned to a keystroke combination, or just typed in.

Kent Cooper, AIA
Message 4 of 12

Neilw_05
Mentor
Mentor

The lines are actually Civil 3D featurelines. They behave like ordinary 3D lines or 3d Polylines except the Stretch tool will not work on them. I have tried grip editing with OSNAPZ=1 and ELEV=0 but it does not prevent the elevation from changing.

Neil Wilson (a.k.a. neilw)
AEC Collection/C3D 2024, LDT 2004, Power Civil v8i SS1
WIN 10 64 PRO

http://www.sec-landmgt.com
0 Likes
Message 5 of 12

Kent1Cooper
Consultant
Consultant

@cadffm wrote:

OSNAPZ does working when grip editing!  ....


Yes, it functions, but it doesn't do what they want, as I understand it.  They want to take grip locations to the XY coordinates of Osnappable points, whatever their elevation and whatever the current drawing plane's elevation, but keeping the grip location's original Z coordinate.  So, say you have a grip [for any kind of object you want to grip-edit that can  take on different Z values, e.g. not a LWPolyline vertex or Arc endpoint] whose current Z coordinate is 1, and you want to take it in such a way to the XY location of some Osnappable place with a Z coordinate of 2, while the current drawing plane is at World Coordinates elevation of 0.  If you grab that grip and haul it to Osnap at the target position when OSNAPZ = 0, it will take the grip there in XY terms, but also give it that location's Z coordinate of 2.  If you haul it there with OSNAPZ = 1, it will end up with the current drawing plane's Z coordinate of 0.  But they want it to keep its original Z coordinate of 1.   The (NXY) function oor 'NXY command [see my previous Reply] will accomplish that.

Kent Cooper, AIA
0 Likes
Message 6 of 12

cadffm
Consultant
Consultant

"The lines are actually Civil 3D featurelines."

Ok, no lines - C3D featurelines

 

But I have to correct my statement too: OsnapZ works NOT for lines, but it works for 3D Polylines!
(and for both 2D polylinetypes the target Z have indepent of osnapz no effect by grip working)

 

About C3D featurelines: I am out, sorry.

 

Sebastian

0 Likes
Message 7 of 12

Neilw_05
Mentor
Mentor

Looks like the NXY routine will do the job. I'll accept this as a solution but other ideas are welcome.

 

Thanks for the help Kent!

Neil Wilson (a.k.a. neilw)
AEC Collection/C3D 2024, LDT 2004, Power Civil v8i SS1
WIN 10 64 PRO

http://www.sec-landmgt.com
0 Likes
Message 8 of 12

Neilw_05
Mentor
Mentor

How do I map the (NXY) LISP tool to a Shortcut Key (i.e. ALT+Z)?

Neil Wilson (a.k.a. neilw)
AEC Collection/C3D 2024, LDT 2004, Power Civil v8i SS1
WIN 10 64 PRO

http://www.sec-landmgt.com
0 Likes
Message 9 of 12

Neilw_05
Mentor
Mentor

I figured it out so good to go.

Neil Wilson (a.k.a. neilw)
AEC Collection/C3D 2024, LDT 2004, Power Civil v8i SS1
WIN 10 64 PRO

http://www.sec-landmgt.com
0 Likes
Message 10 of 12

ronjonp
Mentor
Mentor

Since I took the time to write this, here is something to work with LINES per your original question.

(defun c:foo (/ e ent p p2)
  (and
    (setq e (entsel "\nPick near the end of a line to stretch: "))
    (= "LINE" (cdr (assoc 0 (entget (setq en (car e))))))
    (setq p (vlax-curve-getparamatpoint en (vlax-curve-getclosestpointto en (trans (cadr e) 1 0))))
    (setq p (assoc (if (<= p (/ (vlax-curve-getparamatpoint en (vlax-curve-getendpoint en)) 2.))
		     10
		     11
		   )
		   (entget en)
	    )
    )
    (setq p2 (getpoint (cdr p) "\nPick a point to stretch to: "))
    (entmod (subst (list (car p) (car p2) (cadr p2) (last p)) p (entget en)))
  )
  (princ)
)

 

0 Likes
Message 11 of 12

Neilw_05
Mentor
Mentor

I appreciate your spending time to put this together. I will give it a run when I get a chance. The NXY tool got me through so I need to keep moving forward.

Neil Wilson (a.k.a. neilw)
AEC Collection/C3D 2024, LDT 2004, Power Civil v8i SS1
WIN 10 64 PRO

http://www.sec-landmgt.com
0 Likes
Message 12 of 12

Anonymous
Not applicable


Did you succeed map the (NXY) LISP tool to a Shortcut Key?

 

0 Likes