Set Page Configuration as Current

Set Page Configuration as Current

dbrblg
Collaborator Collaborator
1,282 Views
2 Replies
Message 1 of 3

Set Page Configuration as Current

dbrblg
Collaborator
Collaborator

How do you set a page configuration as current in VBA?

 

I have a few page setups and I'm finding that invariably these are the wrong ones for when the user goes to plot so to save time, I'd like to change the current page setup so that the user can just hit plot and the configuration is mostly correct and they can make the odd change to suit the current print rather than try to configure everything....

 

Thanks

0 Likes
Accepted solutions (1)
1,283 Views
2 Replies
Replies (2)
Message 2 of 3

BestFriendCZ
Advocate
Advocate
Accepted solution

what about this

Sub Test()
    Dim k As AcadPlotConfiguration
    Set k = ThisDrawing.PlotConfigurations.item("SetupName")
    Dim item As AcadLayout
    For Each item In ThisDrawing.Layouts
    If item.ModelType = False Then
        item.CopyFrom k
    End If
    Next item
End Sub
...
0 Likes
Message 3 of 3

Ed__Jobe
Mentor
Mentor

@dbrblg wrote:

How do you set a page configuration as current in VBA?

 

I have a few page setups and I'm finding that invariably these are the wrong ones for when the user goes to plot so to save time, I'd like to change the current page setup so that the user can just hit plot and the configuration is mostly correct and they can make the odd change to suit the current print rather than try to configure everything....

 

Thanks


The answer is the same as what I gave you previously. Use the Layout's CopyFrom method.

Ed


Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
How to post your code.

EESignature

0 Likes