Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Viewport Polyline

4 REPLIES 4
Reply
Message 1 of 5
Anonymous
233 Views, 4 Replies

Viewport Polyline

I was wondering if anyone had a lisp routine which will drop a polyline into
model space which represents the location of a paper space viewport.
Unfortunately, I don't write lisp (yet) but I have heard about this type of
routine being out there. Something that works in both R14 & A2K would be
helpful.

Thanks in advance...............C.D.
4 REPLIES 4
Message 2 of 5
tom_brabant
in reply to: Anonymous

Took a stab at A2k's polygonal viewports. It appears that the release 12 thru 14 rectangular floating viewports have a different method of indicating their location, and will require a seperate handler. The following gizmo "almost works" for polygonal viewports (it is also attached as an enclosure). It deposits something that is the right size and shape, but somehow slightly displaced. I might be misusing the trans function. Any suggestions out there?
;..........................................
(defun c:viewportbound ()
(setq tilemode 0)(command "pspace")
(setq vp (car (entsel " pick viewport in paper space "))
vpg (entget vp)
pointlis nil
)
(while (setq vpg (member (assoc 10 vpg) vpg))
(setq pointlis (cons (cdar vpg) pointlis)
vpg (cdr vpg)
)
)
(setq pointlis (mapcar '(lambda (pnt)(trans (trans pnt 3 2) 2 1)) pointlis))
(command "mspace" "pline")
(mapcar 'command pointlis)
(command "")
)
Message 3 of 5
Anonymous
in reply to: Anonymous

Have you tried the Express Tools ChangeSpace command? You can just trace
the viewport with a polyline, then run changespace and it will drop it into
modelspace--even if it doesn't fall inside the viewport.

--
Ben Maki
NDC Inc.


<.> wrote in message
news:3D96EF3C26A45DBDA238BD40D853F9C0@in.WebX.maYIadrTaRb...
> I was wondering if anyone had a lisp routine which will drop a polyline
into
> model space which represents the location of a paper space viewport.
> Unfortunately, I don't write lisp (yet) but I have heard about this type
of
> routine being out there. Something that works in both R14 & A2K would be
> helpful.
>
> Thanks in advance...............C.D.
>
>
Message 4 of 5
Anonymous
in reply to: Anonymous

Here's one I prepared earlier. . . . . . .
Bit rough but it seems to work.
Pick it to bits.
cheers
Steve

<.> wrote in message
news:3D96EF3C26A45DBDA238BD40D853F9C0@in.WebX.maYIadrTaRb...
> I was wondering if anyone had a lisp routine which will drop a polyline
into
> model space which represents the location of a paper space viewport.
> Unfortunately, I don't write lisp (yet) but I have heard about this type
of
> routine being out there. Something that works in both R14 & A2K would be
> helpful.
>
> Thanks in advance...............C.D.
>
>
Message 5 of 5
Anonymous
in reply to: Anonymous

If you don't mind spending a few $, here is a more elegant solution:

http://www.cadnovation.com/en/products.html

not an endorsement, as I just d/l'ed the trial version over the weekend & have only
as yet tried it in R14, but it seems to do what they say...

> create ModelSpace Viewports that are dynamically linked to the PaperSpace layouts
>

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost