- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Denunciar
So I got this polyline and I am wondering if there is a tool that will create a point at all the corners of poly line.
Then I want to take another EXISTING polyline that is reasonably the same shape and I want to snap that polyline to all the point. I know you can snap to point using line by using mapclean, I am wondering if there is an option for polyline
¡Resuelto! Ir a solución.
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Denunciar
@jeff.wangD95HG wrote:
... a tool that will create a point at all the corners of poly line.
Then I want to take another EXISTING polyline that is reasonably the same shape and I want to snap that polyline to all the point. ....
For the first item, modifying an earlier routine of mine that put Blocks at all vertices:
(vl-load-com)
(defun C:PAPV (/ esel n); = Points at All Polyline Vertices
(if
(and
(setq esel (entsel "\nSelect Polyline: "))
(wcmatch (cdr (assoc 0 (entget (setq pl (car esel))))) "*POLYLINE")
); and
(repeat ; then
(setq n (fix (+ (vlax-curve-getEndParam pl) (if (vlax-curve-isClosed pl) 0 1))))
(command "_.point" "_none" (vlax-curve-getPointAtParam pl (setq n (1- n))))
); repeat
(prompt "\nNothing selected, or not a Polyline.")
); if
(prin1)
); defun
That can be made to allow multiple selection and add the Points to all of them, easily enough.
For the second item, do you mean you want to force the existing other Polyline to share all the vertices of the one with the Points? How about just copying the one with the Points, in-place, and forgetting the other one? Or explain why that won't work [e.g. they're on different Layers and you want to retain that difference, perhaps?]. It's not difficult to impose one Polyline's vertices on another one, though it won't handle other kinds of differences between them, such as one containing arc segments that the other does not, or having arcs as different segments than the other.
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Denunciar
"Or explain why that won't work"
i am making strata plans with polylines that calculates area using "fields". basically I have a table of area all pointing at each specific polyline already setted up and each polyline will be assigned a unit number (so its not as easy as to just rerun data extraction) .
problem is if a floor plan gets changed and all the changes need to propagate to all the floors. So what I hope to achieve is to create point on what has changed on floor 1 and copy those points to other floors to apply the changes. Alternative as you suggested is to create polyline for floor 1 and copy and deleting to replace the poly line on other floors. That would mean I need to re set up the area table to point at the right polyline.
I've attached a drawing on what I mean. Basically make the exact same change to all 4 polyline while maintaining the area table
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Denunciar
Are all floors in the same drawing, as in your sample? If they are all in different drawings, with all affected rooms in the same place in each, then the Coordinates VLA property can be extracted from one and imposed on others. But if it's all in one drawing, and the affected shapes need to get relative new vertex locations but in different places, that wouldn't work.
I expect it would be easier to make a Copy of the initial changed Polyline, and put that in place in the right relationship to the ones you want to match it, rather than put Points around it and Copy those. The imposing of the vertices of the copy on the target one would be very simple, taking vertex-coordinates information from one object to assign to the other, rather than involving multiple source-of-coordinates objects.
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Denunciar
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Denunciar
[See additional content in Message 4.] Would there always be some place on a changed outline that is not changed? Or at least something related, even part of something else like a building exterior corner? My idea would require you to be able to copy the initial changed one to the ones you want matched using some [for example] corner that is still where it was, as a basis for positioning.
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Denunciar
"Would there always be some place on a changed outline that is not changed? Or at least something related, even part of something else like a building exterior corner?"
yes
"you want matched using some [for example] corner that is still where it was, as a basis for positioning."
that is what I am somewhat doing right now manually. I take the changed polyline from floor 1 and copy it as basis to place for the other floors and just manually snap each vertices to the copied floor 1 polyline for each floor. and I am wondering if there is a better way of doing this.
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Denunciar
In very simplest terms, here's a way to impose one Polyline's vertices on another, with a single pick on each rather than grip-editing individual vertices:
(defun C:MPV ; = Match Polyline Vertices
(/ source target)
(setq
source (vlax-ename->vla-object (car (entsel "\nSource Polyline for vertices to impose on target: ")))
target (vlax-ename->vla-object (car (entsel "\nTarget Polyline to match it: ")))
); setq
(vla-put-coordinates target (vla-get-coordinates source))
)
So you would change the one, Copy that to the right place in another floor's plan, use MPV to impose its vertices on the one in that other floor, Move the copy to the next floor, MPV that one, Move the copy to....
In the end, eliminate the copy. REGEN to update the Field values for the change areas.
But the same potential issues apply. Non-zero widths would not carry across if different. Arc segments could cause trouble [even with the same segments being arcs, if the vertices at their ends changed, their bulge factors would probably have changed, too, and that will not be dealt with by just imposing the vertex locations]. You could replace all their vertex and width and bulge-factor entries in entity data, wholesale, instead of going with the Coordinates VLA property, which would be possible though a little more involved. If a "heavy" Polyline has been Fit- or Spline-curved, I'm not sure what would happen [I haven't experimented].
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Denunciar
"Non-zero widths would not carry across if different. Arc segments could cause trouble"
I think that is sufficient for my purpose. I haven't ran into floor plans that require arcs so far.
I initially thought that there are already built in tools for this, but it turn out to be more tedious than I thought. Thanks for the help.