Custom "DIM" commands

Custom "DIM" commands

info
Contributor Contributor
1,134 Views
7 Replies
Message 1 of 8

Custom "DIM" commands

info
Contributor
Contributor

I want to create a custom command by duplicating the “DIM” command that will give me the “Ordinate” command option and turn on ORTHO. I am having trouble with the exact syntax. Can anyone offer some help?

0 Likes
1,135 Views
7 Replies
Replies (7)
Message 2 of 8

Kent1Cooper
Consultant
Consultant

What have you tried so far?  It sounds like an easy enough command to define, but checking for corrections to something you've started could be easier than starting from scratch.

Kent Cooper, AIA
0 Likes
Message 3 of 8

info
Contributor
Contributor

My first thought was this... ^C^Cortho on _dim o;

I used this same method with other commands that had command line option and it worked, for instance:

When I wanted a vertical construction line I did this: ^C^C_xline v;  and it works but the "dim" command it does not.

0 Likes
Message 4 of 8

devitg
Advisor
Advisor

@info  tear off the space o ;

 

^C^Cortho on _dim

 

0 Likes
Message 5 of 8

info
Contributor
Contributor

There is no space after the "o" now.

Or are saying to add one, so I did : ^C^Cortho on _dim o ;

This isn't working either. Here are the results:

Command: ortho Enter mode [ON/OFF] <ON>: on
Command: _dim
Dim: o O
Dim:
** That command may not be invoked transparently **

0 Likes
Message 6 of 8

devitg
Advisor
Advisor

@info Please test as follow 

 

^C^C"orthomode"1 _dim o
0 Likes
Message 7 of 8

info
Contributor
Contributor

Here are the results of that...

 

Command: "orthomode"1 Unknown command ""ORTHOMODE"1". Press F1 for help.
Command: _dim
Dim: o O
Dim:
** That command may not be invoked transparently **
Cannot invoke (command) from *error* without prior call to (*push-error-using-command*).
Converting (command) calls to (command-s) is recommended.
Dim:

0 Likes
Message 8 of 8

Kent1Cooper
Consultant
Consultant

For most of my AutoCAD years, DIM was not a command, but was added late in the game with the different kinds as options.  I don't know whether there's something peculiar about using DIM in a macro, but the direct DIMORDINATE command works for me:

^C^Cortho on _dimordinate

 

[And don't put a ; at the end -- Enter is assumed as a conclusion unless a macro's contents end with a control character such as ^P for echoing to the command line.  My first suggestion was going to be to remove the ; from the end of yours, but that doesn't work either.]

Kent Cooper, AIA
0 Likes