Utility that shows first point of polyline?
CADForums.net Forum Index CADForums.net
Discussion of AutoCAD and other CAD software.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web cadforums.net
Utility that shows first point of polyline?
Goto page 1, 2  Next
 
Post new topic   Reply to topic    CADForums.net Forum Index -> AutoCAD
Author Message
Bert Eding
Guest





Posted: Sun Nov 14, 2004 12:08 am    Post subject: Utility that shows first point of polyline? Reply with quote

Is there a utility that shows where the start/end point is of a polyline?
And also has the possibility to reverse it.
I use acad to genereate profile for a foam cutting machine and need to
change the direction
of the polyline.

Bert

Back to top
Paul Turvill
Guest





Posted: Sun Nov 14, 2004 12:51 am    Post subject: Re: Utility that shows first point of polyline? Reply with quote

The LIST command will give you the starting and end points (along with other
data).
To reverse the direction of a polyline, LWPolyline, or other object, try
REV.LSP from
http://www.turvill.com/t2/free_stuff
___

"Bert Eding" <bert-eding@nospam.nl> wrote in message
news:cn5mjg$q9f$1@reader11.wxs.nl...
Quote:

Is there a utility that shows where the start/end point is of a polyline?
And also has the possibility to reverse it.
I use acad to genereate profile for a foam cutting machine and need to
change the direction
of the polyline.
Back to top
CW
Guest





Posted: Sun Nov 14, 2004 10:09 am    Post subject: Re: Utility that shows first point of polyline? Reply with quote

Type pedit at the command line and fallow the promts.

"Bert Eding" <bert-eding@nospam.nl> wrote in message
news:cn5mjg$q9f$1@reader11.wxs.nl...
Quote:

Is there a utility that shows where the start/end point is of a polyline?
And also has the possibility to reverse it.
I use acad to genereate profile for a foam cutting machine and need to
change the direction
of the polyline.

Bert



Back to top
CW
Guest





Posted: Sun Nov 14, 2004 10:12 am    Post subject: Re: Utility that shows first point of polyline? Reply with quote

Paul, it hs been a while since I used Autocad. Been using Icad. Pedit in
Acad won't reverse a polyline?

"Paul Turvill" <nospam@turvill.com> wrote in message
news:Spedna31ILxf-AvcRVn-uA@whidbeytel.com...
Quote:
The LIST command will give you the starting and end points (along with
other
data).
To reverse the direction of a polyline, LWPolyline, or other object, try
REV.LSP from
http://www.turvill.com/t2/free_stuff
___

"Bert Eding" <bert-eding@nospam.nl> wrote in message
news:cn5mjg$q9f$1@reader11.wxs.nl...

Is there a utility that shows where the start/end point is of a
polyline?
And also has the possibility to reverse it.
I use acad to genereate profile for a foam cutting machine and need to
change the direction
of the polyline.

Back to top
Jürgen Palme
Guest





Posted: Sun Nov 14, 2004 12:46 pm    Post subject: Re: Utility that shows first point of polyline? Reply with quote

Quote:
Pedit in Acad won't reverse a polyline?

No.

Juergen
Back to top
Bert Eding
Guest





Posted: Sun Nov 14, 2004 6:06 pm    Post subject: Re: Utility that shows first point of polyline? Reply with quote

Hi,

Thanks for all the info.
I tried the rev.lsp
But nothing happens no output error or anything., and no reversing.
Did I do something wrong or is the tool incompatible with acad 2005?

Bert


"Bert Eding" <bert-eding@nospam.nl> schreef in bericht
news:cn5mjg$q9f$1@reader11.wxs.nl...
Quote:

Is there a utility that shows where the start/end point is of a polyline?
And also has the possibility to reverse it.
I use acad to genereate profile for a foam cutting machine and need to
change the direction
of the polyline.

Bert

Back to top
CW
Guest





Posted: Sun Nov 14, 2004 8:58 pm    Post subject: Re: Utility that shows first point of polyline? Reply with quote

How lame. It will in Intellicad.

"Jürgen Palme" <juergenDEL.palmeALL@kabelleipzigCAPS.de> wrote in message
news:2vogqlF2lgdhlU1@uni-berlin.de...
Quote:
Pedit in Acad won't reverse a polyline?

No.

Juergen

Back to top
Paul Turvill
Guest





Posted: Sun Nov 14, 2004 10:45 pm    Post subject: Re: Utility that shows first point of polyline? Reply with quote

It works with all versions. How are you attempting to use it?
___

"Bert Eding" <bert-eding@nospam.nl> wrote in message
news:cn7loc$3cd$1@reader11.wxs.nl...
> Did I do something wrong or is the tool incompatible with acad 2005?
Back to top
Paul Turvill
Guest





Posted: Sun Nov 14, 2004 10:48 pm    Post subject: Re: Utility that shows first point of polyline? Reply with quote

Are you certain it isn't working? It isn't obvious on polylines using
CONTINUOUS linetype. Have you tried LISTing the polyline both before and
after using REV.LSP?
___

"Bert Eding" <bert-eding@nospam.nl> wrote in message
news:cn7loc$3cd$1@reader11.wxs.nl...
Quote:
I tried the rev.lsp
But nothing happens
Back to top
Jürgen Palme
Guest





Posted: Mon Nov 15, 2004 12:15 am    Post subject: Re: Utility that shows first point of polyline? Reply with quote

Here it also doesn't work, neiter in 2005 nor in 2004.
Try this: Draw a polyline. Start the pedit command, Edit, the marker is
visible at the startpoint of the polyline.
Now start rev.lsp, pick the polyline. No error message, nothing happens.
Start the pedit command, Edit, and the marker jumps - to the same end of the
polyline -> not reversed.

:-(
Juergen



"Paul Turvill" <nospam@turvill.com> schrieb im Newsbeitrag
news:ke6dncbVJostBArcRVn-vQ@whidbeytel.com...
Quote:
It works with all versions. How are you attempting to use it?
___

"Bert Eding" <bert-eding@nospam.nl> wrote in message
news:cn7loc$3cd$1@reader11.wxs.nl...
Did I do something wrong or is the tool incompatible with acad 2005?

Back to top
Bert Eding
Guest





Posted: Mon Nov 15, 2004 1:39 am    Post subject: Re: Utility that shows first point of polyline? Reply with quote

Did some more experiments with REV.

First of all rev may conflict with the acad REVOLVE command.

Second: When drawing a simple poly line with a few segments it works now.

Third: With a bigger spline consisting out of a lot of segments (+/- 100) i
get:
===============
Command: (load"rev")
Command: rev
Pick an object to reverse:
At least one break point must be on polyline.*Invalid*
=================
Acad 2005

Bert


"Paul Turvill" <nospam@turvill.com> schreef in bericht
news:6pmdnc8FVpv2BwrcRVn-vA@whidbeytel.com...
Quote:
Are you certain it isn't working? It isn't obvious on polylines using
CONTINUOUS linetype. Have you tried LISTing the polyline both before and
after using REV.LSP?
___

"Bert Eding" <bert-eding@nospam.nl> wrote in message
news:cn7loc$3cd$1@reader11.wxs.nl...
I tried the rev.lsp
But nothing happens

Back to top
Paul Turvill
Guest





Posted: Mon Nov 15, 2004 2:57 am    Post subject: Re: Utility that shows first point of polyline? Reply with quote

The conflict with REVolve (not a "vanilla" AutoCAD command) is easily fixed
by changing the name:
(defun C:PLREV ...
or whatever you choose. And, yes it is likely to have problems with very
complex objects; it's intended mostly for simple pipe runs or contours where
the user wants to reverse them to properly show text in complex linetypes.
___

"Bert Eding" <bert-eding@nospam.nl> wrote in message
news:cn8gb7$fpn$1@reader11.wxs.nl...
Quote:

First of all rev may conflict with the acad REVOLVE command.
Back to top
Paul Turvill
Guest





Posted: Mon Nov 15, 2004 3:28 am    Post subject: Re: Utility that shows first point of polyline? Reply with quote

Sorry, that is to say REV is defined as a shortcut in acad.pgp, and
therefore isn't a core command; REVOLVE, of course, is. To resolve any
conflict, two options exist: rename REV.LSP or change acad.pgp.

"Paul Turvill" <nospam@turvill.com> wrote in message
news:oKydnUet7JVLSQrcRVn-og@whidbeytel.com...
> The conflict with REVolve (not a "vanilla" AutoCAD command)
Back to top
Jeff
Guest





Posted: Mon Nov 15, 2004 8:13 am    Post subject: Re: Utility that shows first point of polyline? Reply with quote

Here's one that will place an X (just like the pedit/edit vertex command) at
the beginning of the pline and ask if you want it reversed. The way it is
written the pline MUST be a LWpolyline, but could be modified to accept all
types.

;;Routine to show start point of pline and optionally reverse the direction
;;Jeff Mishler, November 2004
(defun c:p_check (/ ANS COORDS ENT ENTLST IDX NEWCOORDS OBJ newbulges)
;; Marker for point location on the screen
;; Oct. 2004 by Jeff Mishler
(defun Xmarksthespot (x y / leglen start)
(setq start (list x y)
leglen (* 0.03 (getvar "viewsize"))
)
(grdraw (polar start (angtof "135" 1) leglen)
(polar start (angtof "315" 1) leglen)
7)
(grdraw (polar start (angtof "45" 1) leglen)
(polar start (angtof "225" 1) leglen)
7)
)
(if (and (setq ent (entsel "\nSelect polyline: "))
(setq entlst (entget (car ent)))
(eq (cdr (assoc 0 entlst)) "LWPOLYLINE")
)
(progn
(vl-load-com)
(setq obj (vlax-ename->vla-object (car ent)))
(setq coords (vlax-get obj "coordinates"))
(setq idx 0
newcoords '()
newbulges '()
cnt 0)
(xmarksthespot (car coords) (cadr coords))
(initget "Yes No")
(setq ans (getkword "\nReverse?: [Yes/No]"))
(if (eq ans "Yes")
(progn
(while (< idx (length coords))
(setq newcoords (append (list (nth idx coords) (nth (1+ idx) coords))
newcoords))
(setq newbulges (append (list (- (vla-getbulge obj cnt))) newbulges))
(setq idx (+ 2 idx)
cnt (1+ cnt))
)
(vlax-put obj "coordinates" newcoords)
(setq newbulges (append (cdr newbulges) '(0.0)))
(while (/= -1 (setq cnt (1- cnt)))
(vla-setbulge obj cnt (nth cnt newbulges))
)
(redraw)
(xmarksthespot (car newcoords) (cadr newcoords))
)
)
)
)
(princ)
)
(princ "\n P_check loaded, type p_check to run......")


--
Jeff
check out www.cadvault.com
"Bert Eding" <bert-eding@nospam.nl> wrote in message
news:cn5mjg$q9f$1@reader11.wxs.nl...
Quote:

Is there a utility that shows where the start/end point is of a polyline?
And also has the possibility to reverse it.
I use acad to genereate profile for a foam cutting machine and need to
change the direction
of the polyline.

Bert

Back to top
Jürgen Palme
Guest





Posted: Mon Nov 15, 2004 10:44 pm    Post subject: Re: Utility that shows first point of polyline? Reply with quote

Quote:
Here it also doesn't work ...

Ok, I found the error. In the function (defun prev ...) we see a line
(setq zoomit (null (ssget "c" final final)))

I modified this to
(setq zoomit (null (ssget "_c" final final)))
and now the rev.lsp works well like expected.


Juergen
Back to top
 
Post new topic   Reply to topic    CADForums.net Forum Index -> AutoCAD All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




Windows Server DSP VoIP Electronics New Topics
Powered by phpBB