Automating the Layout Generation and Page Setup
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
I am trying to automate my work as follows –
I have an Access query that has finalized my calculations and I am able to draw objects with different configurations as follows –
The rs below is a simple snapshot of query at runtime I indicated above.
ObjectLocation(0) = 0
ObjectLocation(1) = 0
ObjectLocation(2) = 0
i = 1
Do While Not rs.EOF
DrawObject at ObjectLocation in modelspace
ObjectLocation(0) = ObjectLocation(0) + 5000
'What I would like to do here is –
‘1. Create a new layout tab
‘2. Assign that layout a name as “Column “& i
‘3. Set paper size to A0
‘4. Create new Paperspace Viewport
‘4.1 Set newly created viewport height to rs.Fields(“Height”).Value
‘4.2 Set newly created viewport width to rs.Fields(“Width”).Value
‘4.3 Goto Modelspece from newly created viewport
‘4.4 Zoom viewport center to ObjectLocation
'4.5 Set Height to rs.Fields(“TotalHeight”).Value
Come back to paperspace.
i = i + 1
rs.movenext
Loop
The DrawObject process by itself is very complex and it is well accomplished. However, preparing drawing on Layout is where I am stuck up. I am not strong with the Layout / Plot and their configuration within VBA.
Can anyone provide me with the skeleton code, that I can piggyback on.
If desired, I will upload my sample database for the ready reference.
Nimish
@grobnikI've not yet dipped my toes into the link you provided below
https://forums.autodesk.com/t5/vba/vba-plotting-page-setups/td-p/1198553