Originally Posted by
BoKirra
...
Code:
If a specified drawing (in folder "C:\Test", for example) is open, set "LTscale" to 0.5.
Sorry, cant resist. But just for fun, that would translate to:
Code:
Dim aDoc As AcadDocument
For Each aDoc In Documents
If aDoc.FullName = "C:\Test\SomeDrawing.dwg" Then
ThisDrawing.SetVariable "LTSCALE", 0.5
MsgBox "The value of LTSCALE is now " & ThisDrawing.GetVariable("LTSCALE") & "."
End If
Next
But, I would strongly encourage you to go for .NET while you're at the least knowledge on VBA. Because when you can solve 95% of the problems in VBA, you would find it hard/impractical to learn/bother using a stand alone developing software (e.g. Visual Studio Express) as opposed to using the integrated VBA IDE in AutoCAD. Like me, who was encouraged many times to learn .NET, never found the time or the necessity to do it. So, go for it while you can.