So I'm starting to dabble with VB in AutoCAD. Managed to modify some code to get the following that will center a layout. Also made one to set the offset back. I can't, however, figure out how to make it toggle with one button. I'm assuming it's the = Not part that I need to modify, but I just don't know how to. Once again, I'm too busy to read up on it right now, so I would appreciate any suggestions on how to make it toggle, criticism about the layout, or a general explanation about how you're feeling today. Thank you for your time. I love you all :love:
Sub PlotCentered()
Dim ACADLayout As ACADLayout
Set ACADLayout = ThisDrawing.ActiveLayout
ACADLayout.CenterPlot = Not ACADLayout.CenterPlot
ThisDrawing.Regen acAllViewports
End Sub
Sub PlotOffset()
Dim ACADLayout As ACADLayout
Dim newValue(0 To 1) As Double
Set ACADLayout = ThisDrawing.ActiveLayout
newValue(0) = 0
newValue(1) = 64.516
ACADLayout.PlotOrigin = newValue
ThisDrawing.Regen acAllViewports
End Sub