muck Posted July 22, 2010 Posted July 22, 2010 Can VBA be used to Rename a Layout Tab with version 2010 of AutoCAD? Thank you, Quote
rkmcswain Posted July 22, 2010 Posted July 22, 2010 Can VBA be used to Rename a Layout Tab with version 2010 of AutoCAD?Thank you, Yes. ThisDrawing.Layouts.Item(0).Name = "Renamed" Quote
10west Posted July 26, 2010 Posted July 26, 2010 You know it took me a while to also utilize something within AutoCAD which often times let me access AutoCAD control which was impossible, or just more complicated through the Object model. Although it is part of the object model, it bypasses the standard way of manipulating acad objects in VBA/VB. I wanted to code, and considered it a cheat, until in many circumstances it was easier, as or more reliable, and fast enough. I soon saw the light, and also liked the fact that sometimes, due to command line options, it also allowed more optional control when doing an acad operation. The AutoCAD "sendcommand" method is nice. For instance, if you are inserting a block, with standard vb and vba, and you have set the block and in the steps of rotating, or scaling, you don't see the ghosted block like you do at the command line, but with sendcommand, you see the insertion as if you where inserting from the command line. It's true that sendkeys can be used from the BASIC language, but it sometimes hangs, or does unpredicatable things, sendcommand is very reliable in my experience, and also uses the familiar command line syntax and options of acad. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.