Jump to content

vba plotting layouts


erik_NL

Recommended Posts

goodday,

 

i'm having some trouble with plotting of layouts. Al the others functions (not related functions) work but i do have some problems with plotting a layout. My most succesful code is;

        
   Dim PlotLayout As AcadLayout
   Dim PlotLayouts As AcadLayouts

   ' On Error Resume Next
   If ThisDrawing.ActiveSpace = acModelSpace Then
       ThisDrawing.ActiveSpace = acPaperSpace
       Set PlotLayouts = ThisDrawing.Layouts
       Else
       End If
       
       On Error Resume Next
       If PlotLayout.Name <> "Model" Then
               ThisDrawing.ActiveLayout = PlotLayout
               ThisDrawing.Plot.PlotToDevice
               VBA.DoEvents
       End If

the "on error resume next" was one of the last options to test. I copied code from the Help, checked some things out of the Joe Sutphin book, copied code from the plot.dvb from activedwg.com etc etc with no succes.

 

On running this code i get by the second layout (layout2) a unfinished program witch shows a a commandline input request as if something ain't finished (thats the reason for the vba.doevents)

 

 

Command: Regenerating model - caching viewports.

Command:
Command: Restoring cached viewports - Regenerating layout.

Command: Regenerating layout.
Restoring cached viewports - Regenerating layout.

 

I want to batch plot (in first plot one drawing and if succesful batchplot folders) all layouts to a TDS9600 and/or a dwg2pdf plotter.

 

tia.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...