Hi everyone,
Thank you for reading my post.
I have already searched for methods to override the default parameter of the AutoCAD's command but I have not found one yet.
e.g MTEXT command, I would like to have 'Line spacing' will be the default parameter.
Are there any methods for this? Thank you.
Solved! Go to Solution.
Solved by JamesMaeding. Go to Solution.
Solved by _gile. Go to Solution.
when faced with hard coded defaults, many times we will use scripting (meaning sendcommand or whatever) to draw some text to set def's, then erase, then draw what we want.
You are not being clear if you want to only use .net to do this, or if you just found this part of the forum and are asking a general question.
I would typically do this with lisp.
internal protected virtual unsafe Human() : mostlyHarmless
I'm just here for the Shelties
Thanks for your reply.
I am using .net for working on with my projects. The request is when user hits 'space bar', AutoCAD will repeat the command with the same action when they call my command method.
e.g. I have a command method to call 'qleader' command with 'Line spacing' as default. However, when user hits 'space bar', it calls 'qleader' with the default parameter instead of 'Line spacing'. Therefore, I think it will be great to have some ways to override the default parameter of 'qleader' so that when it calls again, the 'Line spacing' will be set as default.
That us a different subject, and I recall gile spoke about that in another thread recently.
The issue is you seem a bit new at programming acad and behavior of command line and so on.
This situation happens with lisp, where you can run a function as a function, like (dosomething),
or it can be defined as a command like (defun c:dosomething ()(code.......)) and then that runs as a command.
When you hit enter, it reruns it.
So one approach is to wrap your .net command in a lisp statement, and we do this normally anyway for key ins, like:
(defun c:DS ()(command "dosomething")(princ))
That DS could be anything, and you can put other kinds of things where i have (command "dosomething").
Gile is much better at .net context advice, and he gave that in the other thread. Nice of him to repeat that since Kean talked about it back when Autodesk had their act together.
internal protected virtual unsafe Human() : mostlyHarmless
I'm just here for the Shelties
Can't find what you're looking for? Ask the community or share your knowledge.