Create plot configuration from layout

Create plot configuration from layout

Anonymous
Not applicable
462 Views
4 Replies
Message 1 of 5

Create plot configuration from layout

Anonymous
Not applicable
In autocad, you can create a new page setup from an existing layout's page setup. How can this be done in VBA? I've looked at copyfrom, but that only apears to be for copying from plot configurations and not layouts. Any ideas?
0 Likes
463 Views
4 Replies
Replies (4)
Message 2 of 5

Anonymous
Not applicable
Depending upon which help file you are looking at, it may not be correct. But, you can use CopyFrom on layouts and PlotConfigs interchangeably. -- ---- Ed ---- "johnsonm" wrote in message news:[email protected]... > In autocad, you can create a new page setup from an existing layout's page setup. How can this be done in VBA? I've looked at copyfrom, but that only apears to be for copying from plot configurations and not layouts. Any ideas?
0 Likes
Message 3 of 5

Speed_CAD
Collaborator
Collaborator
Hi...

You can do it with ObjectDBX too.

First you must know the name of page setup and next copy it.

'file from ObjectDBX
dbxApp.Open File

Set objPlots = dbxApp.PlotConfigurations
Set objPlot = objPlots.Item(name)

'from current drawing
Set objPlotsCurrent = acadDoc.PlotConfigurations
Set objPlotCurrent = objPlotsCurrent.Add(name)

'copy page setup
objPlotCurrent.CopyFrom objPlot

Set dbxApp = Nothing

Note:
If page setup is in Model Space and your drawing is in Paper Space send a error. Is the same reverse...

Un saludo de SpeedCAD.. 😄
CHILE
FORO: http://www.hispacad.com/foro
Mauricio Jorquera
0 Likes
Message 4 of 5

Anonymous
Not applicable
You don't need ObjectDbx to do that. You can do it with ThisDrawing as well. -- ---- Ed ---- "SpeedCAD" wrote in message news:[email protected]... > Hi... > > You can do it with ObjectDXB. > > First you must know the name of page setup and next copy it. > > 'file from ObjectDBX > dbxApp.Open File > > Set objPlots = dbxApp.PlotConfigurations > Set objPlot = objPlots.Item(name) > > 'from current drawing > Set objPlotsCurrent = acadDoc.PlotConfigurations > Set objPlotCurrent = objPlotsCurrent.Add(name) > > 'copy page setup > objPlotCurrent.CopyFrom objPlot > > Set dbxApp = Nothing > > Note: > If page setup is in Model Space and your drawing is in Paper Space send a error. Is the same reverse... > > Un saludo de SpeedCAD.. :D > CHILE > FORO: http://www.hispacad.com/foro
0 Likes
Message 5 of 5

Speed_CAD
Collaborator
Collaborator
Hi Ed Jobe...

Yes, I know that I don't need ObjectDBX, but with this you can do it invisible :D...

Un Saludo de SpeedCAD... 😄
CHILE
FORO: http://www.hispacad.com/foro
Mauricio Jorquera
0 Likes