I have a function that uses AcadApplication.ActiveDocument.SendCommand to allow the user to scale the inserted lines and text before the next step of the process, but AutoCAD does not display the scale prompt until after the entire program finishes. The prompt works well, but needs to be displayed before I end the sub.
How do I get the command to be sent immediately? Is there another way to allow users to scale the items I insert? The screen needs to be refreshed before the scale command is called, so that the lines and text I just added shows up. I have attached the code for the SendCommand call and for the function that calls it. Please let me know if additional information is needed.
Sorry no one bothered to comment (Including me). I had started to throw together an example, but I hit a snag and have not been able to spend the time to work it out.
I think you want to look into a DrawJig. Getting the WorldDraw override working correctly will be the tricky part.
using DrawJig to drag draw your ents, you could avoid using the "_scale " command.
The attached code sample gives the basic idea of scaling a block ref, but could be adapted to draw a collection of entities passed into the instance and then within WorldDraw() transform (Matrix3d.Scaling()) each entity within the collection before calling draw.Geometry.Draw() on each entity.
Hello , CadMeUp,
I am trying to use your code and can't even know how to call this class,
Can you please help me and tell me how to call your class .
I mean If I want to user <commandmethod> . what should be in sub to call your class?
Sorry for the late reply here, attached is a more detailed C# code file and a test dwg. The code file contains everything needed to compile and execute the command. You can tweak it as needed. I haven't produced the VB equivalent of the code as yet.
Access a broad range of knowledge to help get the most out of your products and services.