This seems to be the purpose of Kean's example, but I do not think it is very relevent: the Editor.Command() also accepts pauses for user input. An 'X' will appear on the current attribute. After selecting the attributes you want to edit, AutoCAD will step through the attributes one at a time. That said, the main question is: what is the difference between Command() and CommandAsync(), in other words, when must we have to use CommandAsync() rather than Command(). Look what's hidden in the ATTEXT command The ability to edit the attribute value, position, height, rotation angle, text style, layer and color. For the last one, a constant have added to the Editor class : Editor.PauseToken. ).Īs with the LISP function command, numbers or points can be passed as string (as on command line).Īn empty string ("") stands for Enter and backslash for a pause for user input. NET type (int, double, Point2d, Point3d, ObjectId, SelectionSet. This means the arguments (the command name and the command inputs) can be passed separated by a comma (no need to build an array as in the examples on the Adn DevBlog and GitHub). So, I made some tests to try to deeply understand how work these new methods and share the results here.īoth Editor.Command() and Editor.CommandAsync() accept a params array of object as argument. Googling for CommandAsync I only found 3 examples: a thread on Kean Walmsley's blog, another one from AutoCAD DevBlog and a code sample on GitHub. The docs about these methods are more than laconic: " This is Command, a member of class Editor." Note that these methods are no longer available. A good way to list all the drawings with path into a text file that you can bring into excel dir. These method replace the need to P/Invoke acedCmd() or call the non-public Editor.RunCommand() to synchronously run AutoCAD commands. An example would be: Open the drawing > Go to the desired sheet view > Select the titleblock from a predictable location > att edit > Save > Close. Since AutoCAD 2015, two instance methods have been added to the Editor class: Editor.Command() and Editor.CommandAsync().
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |