Message 1 of 7
A VBA Newbie

Not applicable
12-14-2004
11:50 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello everyone,
I'm tryting to learn VBA and I have some experience in Lisp. I'm playing
with VBA from last few weeks so I think i got some basic stuff. here is my
first CODE in VBA.
Public Sub testforplot()
Dim pagesetups As AcadPlotConfigurations
Dim pagesetup As AcadPlotConfiguration
Dim newpage1 As AcadPlotConfiguration
Set pagesetups = ThisDrawing.PlotConfigurations
Set newpage1 = ThisDrawing.PlotConfigurations.Add("test")
newpage1.PlotRotation = ac270degrees
newpage1.PlotType = acLayout
newpage1.PlotWithPlotStyles = True
newpage1.ConfigName = "Plotter.pc3"
newpage1.StyleSheet = "test.STB"
newpage1.StandardScale = ac1_1
newpage1.CanonicalMediaName = "user636"
newpage1.PlotWithLineweights = True
newpage1.ScaleLineweights = True
End Sub
I know I can use WITH statement to replace all newpage1. My question is how
to make plotconfigurations (name "test") active and assign with layouts?
I'm trying to do this but with name
If PlotConfigurations.count = 0 Then
'*** Customize the new configuration to your satisfaction ***
PlotConfigurations.Add "NEW_CONFIGURATION"
End If
Can i go by plotconfigurations name like this
If PlotConfigurations.count = "test" Then
'*** Customize the new configuration to your satisfaction ***
PlotConfigurations.Add "NEW_CONFIGURATION"
End If
Thank you for your help. I will keep posting here becasue I'm VBA Newbie.