Truncating coordinates on a light weight polyline

Truncating coordinates on a light weight polyline

Anonymous
Not applicable
194 Views
2 Replies
Message 1 of 3

Truncating coordinates on a light weight polyline

Anonymous
Not applicable
I want to shorten an existing polyline to just two coordinates. The help
reference on .Coordinates states first that:
'You cannot change the number of coordinates in the object by using this
property. You can only change the location of existing coordinates.'

Followed by:

'When setting the coordinates for a polyline, if you supply fewer
coordinates than the object currently possesses, the polyline will be
truncated. Any fit points applying to the truncated vertices will also be
truncated. If you supply more coordinates than the object currently
possesses, the extra vertices will be appended to the polyline.'

It would appear that the second statement applies to 'Polyline' objects only
and not 'LighweightPolyline' objects since my code is only replacing the
first two coordinates.

Does anyone know of a method of truncating the polyline without erasing it
(I have quite a bit of code that is keyed to the polyline's handle)?

Thanks,

Donald F. Sanborn
0 Likes
195 Views
2 Replies
Replies (2)
Message 2 of 3

Anonymous
Not applicable
Create an array with your two new points and feed that array to the
Coordinates property. That should knock it down to two points.

--
http://www.acadx.com


"dsanborn" wrote in message
news:76BA7CA29B749AD4EC6ABB3B6420E75D@in.WebX.maYIadrTaRb...
> I want to shorten an existing polyline to just two coordinates. The
help
> reference on .Coordinates states first that:
> 'You cannot change the number of coordinates in the object by using
this
> property. You can only change the location of existing coordinates.'
>
> Followed by:
>
> 'When setting the coordinates for a polyline, if you supply fewer
> coordinates than the object currently possesses, the polyline will
be
> truncated. Any fit points applying to the truncated vertices will
also be
> truncated. If you supply more coordinates than the object currently
> possesses, the extra vertices will be appended to the polyline.'
>
> It would appear that the second statement applies to 'Polyline'
objects only
> and not 'LighweightPolyline' objects since my code is only replacing
the
> first two coordinates.
>
> Does anyone know of a method of truncating the polyline without
erasing it
> (I have quite a bit of code that is keyed to the polyline's handle)?
>
> Thanks,
>
> Donald F. Sanborn
>
>
>
>
>
0 Likes
Message 3 of 3

Anonymous
Not applicable
Frank,
That's what I'm doing and all it does is change the first two coordinates
(it doesn't truncate).

Thanks,
Don


"Frank Oquendo" wrote in message
news:4FCE0E8B80E32CD12E628BF393FE2857@in.WebX.maYIadrTaRb...
> Create an array with your two new points and feed that array to the
> Coordinates property. That should knock it down to two points.
>
> --
> http://www.acadx.com
>
>
> "dsanborn" wrote in message
> news:76BA7CA29B749AD4EC6ABB3B6420E75D@in.WebX.maYIadrTaRb...
> > I want to shorten an existing polyline to just two coordinates. The
> help
> > reference on .Coordinates states first that:
> > 'You cannot change the number of coordinates in the object by using
> this
> > property. You can only change the location of existing coordinates.'
> >
> > Followed by:
> >
> > 'When setting the coordinates for a polyline, if you supply fewer
> > coordinates than the object currently possesses, the polyline will
> be
> > truncated. Any fit points applying to the truncated vertices will
> also be
> > truncated. If you supply more coordinates than the object currently
> > possesses, the extra vertices will be appended to the polyline.'
> >
> > It would appear that the second statement applies to 'Polyline'
> objects only
> > and not 'LighweightPolyline' objects since my code is only replacing
> the
> > first two coordinates.
> >
> > Does anyone know of a method of truncating the polyline without
> erasing it
> > (I have quite a bit of code that is keyed to the polyline's handle)?
> >
> > Thanks,
> >
> > Donald F. Sanborn
> >
> >
> >
> >
> >
>
>
0 Likes