View Full Version : Change CannoScale from VBA
deibitx
2011-11-27, 04:35 PM
Hi to all,
I'm trying to change the CannoScale from VBA, but I don't know the correct comand.
for example (changing the layer):
ActiveDocument.ActiveLayer = ActiveDocument.Layers("name of new layer")
Thanks in advance
BlackBox
2011-11-27, 06:29 PM
Welcome to AUGI!
Perhaps these examples will be helpful...
Get system variable:
Thisdrawing.getvar ("VARIABLE_NAME")
Set system variable:
Thisdrawing.setvar "VARIABLE_NAME",VALUE
deibitx
2011-11-27, 10:46 PM
Thanks a lot RenderMan but i get the variable called Cannoscale and from autocad works ok, but the problem is that if I write (VBA):
ThisDrawing.ActiveCannoscale = ThisDrawing.Cannoscale("1:100")
It doesn't works. And for layers, text...works perfectly with the name of the variable...
Thanks again
BlackBox
2011-11-27, 11:50 PM
... the problem is that if I write (VBA):
ThisDrawing.ActiveCannoscale = ThisDrawing.Cannoscale("1:100")
It doesn't works. And for layers, text...works perfectly with the name of the variable...
Look more closely at the latter portion of my previous post ;):
Set system variable:
Thisdrawing.setvar "VARIABLE_NAME",VALUE
deibitx
2011-11-28, 07:18 PM
Thanks a lot, finally I get it. I only had to change a small thing to your code.
BlackBox
2011-11-28, 07:32 PM
Thanks a lot, finally I get it. I only had to change a small thing to your code.
No worries; Happy to help. :beer:
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.