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

Locating Target of Viewport

8 REPLIES 8
Reply
Message 1 of 9
bcarlisle
674 Views, 8 Replies

Locating Target of Viewport

I am attempting to write a routine that creates several new layouts, inserts titleblocks, and creates various viewports. I have all of this working except for one (frustrating) issue:

How can I set the "targets" of the viewports? I have vlisp creating the viewports, sized and located as needed. I have them scaled as needed. But I cannot figure out how to "pan" them to specific point.

Is -pan how I need to do this? I've been looking at setting the "target" property via (vla-put-target ...), but this does not seem to do what I expected it would.

Any help will be greatfully appreciated.

Brian S. Carlisle
8 REPLIES 8
Message 2 of 9
Anonymous
in reply to: bcarlisle

ZOOM / Center / <> / ... ___ "bcarlisle" wrote in message news:27228238.1094592228696.JavaMail.jive@jiveforum2.autodesk.com... > > Is -pan how I need to do this? I've been looking at setting the "target" property via (vla-put-target ...), but this does not seem to do what I expected it would.
Message 3 of 9
bcarlisle
in reply to: bcarlisle

Ah...the easy one's are always the hardest to see. 😉

Thanks!

But this leads me into a second, related question. What is the target property of a viewport? I used the (vlax-dump-object ...) function to get the settings on some sample viewports. I noticed that the Target was (0,0) on some viewports, while others had actual values.

Any ideas?
Message 4 of 9
Anonymous
in reply to: bcarlisle

I have no idea. I've never used or paid any attention to anything called the "target" of a viewport. However, Zoom / C will always zoom relative to the center of the current viewport. ___ "bcarlisle" wrote in message news:18276382.1094593212417.JavaMail.jive@jiveforum2.autodesk.com... > > I noticed that the Target was (0,0) on some viewports, while others had actual values.
Message 5 of 9
old-cadaver
in reply to: bcarlisle

<>

Ummm... that's not quite accurate. Zoom C will place the "selected point" in the center of the viewport after the zoom.

(getvar "viewctr") will return the center of the current viewport.

As for TARGET, the system variable, I still have no clue as to it's function, or the data that it holds. It seems to have nothing to do with the DVIEW TARGET or the VIEWCTR. HELP only says that it is the TARGET point of the viewport, whatever the heck that means.
Message 6 of 9
Anonymous
in reply to: bcarlisle

OK, be picky. 8-)) That's the point I intended to make: the point selected after the ZOOM / C ... command sequence will move to the center of the current viewport. In my book, that's "relative to the center of the viewport," isn't it? ___ "OLD-CADaver" wrote in message news:1436086.1094601885221.JavaMail.jive@jiveforum1.autodesk.com... > > Ummm... that's not quite accurate. Zoom C will place the "selected point" in the center of the viewport after the zoom.
Message 7 of 9
old-cadaver
in reply to: bcarlisle

<>

Correct, but only AFTER the completion of that ZOOM command would that be the center of the viewport. It was my understanding from the original post that the OP wished to determine "some" point utilizing TARGET. Then he could ZOOM C or PAN or whatever with that point.

But then again, it's been a very long day.
Message 8 of 9
bcarlisle
in reply to: bcarlisle

That is correct. Thanks to both on this one. The (getvar "viewctr") function combined with the Zoom C will do exactly what I need. But I still don't have a clue about the Target thing...
Message 9 of 9
Anonymous
in reply to: bcarlisle

you might also let the user perform a pan (command "._rtpan")

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

Post to forums  

Autodesk Design & Make Report

”Boost