Get Real World Coordinates of Layout
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
Get Real World Coordinates of Layout

 
Post new topic   Reply to topic    CADForums.net Forum Index -> VBA
Author Message
wgrc
Guest





Posted: Tue Mar 15, 2005 11:47 pm    Post subject: Get Real World Coordinates of Layout Reply with quote

I have a question about Layouts. I am a novice at AutoCAD, having more experience with ArcGIS. But I think this should be possible?:

I have a DWG with mutliple layouts for printing sub-regions of a community (the DWG covers the entire community). I want to use VBA to retrieve the REAL world model space coordinates that each Layout depicts, not the paper space units. Is this possible? All the experimenting so far has only yielded paper space coordinates.

Thanks in advance!

Greg Coniglio

Public Sub MyTest()


Dim dwg As AutoCAD.AcadDocument
Set dwg = ThisDrawing

Dim lyt As AcadLayout
Dim blk As AcadBlock
Dim vpt As AcadViewport

For L = 0 To dwg.Layouts.Count - 1
Set lyt = dwg.Layouts(L)
Set blk = lyt.Block
'MsgBox dwg.Viewports(L).Name
'Set vpt = dwg.Viewports(L)

MsgBox lyt.PlotOrigin(0)
Next L

End Sub

Back to top
James Belshan
Guest





Posted: Tue Mar 22, 2005 4:53 am    Post subject: Re: Get Real World Coordinates of Layout Reply with quote

I think what you need are the WCS coordinates of the viewports on the
layouts. Here's a start for you, hopefully...

http://groups-beta.google.com/group/autodesk.autocad.customization.vba/search?q=wcs+viewport+coordinates

HTH,
James


"wgrc" <nospam@address.withheld> wrote in message
news:28242224.1110912456829.JavaMail.jive@jiveforum1.autodesk.com...
Quote:
I have a question about Layouts. I am a novice at AutoCAD, having more
experience with ArcGIS. But I think this should be possible?:

I have a DWG with mutliple layouts for printing sub-regions of a community
(the DWG covers the entire community). I want to use VBA to retrieve the

REAL world model space coordinates that each Layout depicts, not the paper
space units. Is this possible? All the experimenting so far has only
yielded paper space coordinates.
Quote:

Thanks in advance!

Greg Coniglio

Public Sub MyTest()


Dim dwg As AutoCAD.AcadDocument
Set dwg = ThisDrawing

Dim lyt As AcadLayout
Dim blk As AcadBlock
Dim vpt As AcadViewport

For L = 0 To dwg.Layouts.Count - 1
Set lyt = dwg.Layouts(L)
Set blk = lyt.Block
'MsgBox dwg.Viewports(L).Name
'Set vpt = dwg.Viewports(L)

MsgBox lyt.PlotOrigin(0)
Next L

End Sub
Back to top
 
Post new topic   Reply to topic    CADForums.net Forum Index -> VBA All times are GMT
Page 1 of 1

 
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