Drawings SDK Developer Guide > Working with .dwg Files > Working with Other File Formats > Working with Commands > Overview of Commands
Overview of Commands

Drawings SDK provides the ability to execute any amount of various commands. Some commands require only the command name to execute them (for example, the TDFILEPRODUCT command), other commands require parameters (for example, the LINE command), and some commands provide dialog boxes for setting properties (for example, the VIEW command).

The following examples describe how to work with commands using the OdaMfcApp sample application.

Starting commands

In OdaMfcApp, start commands by selecting one of the following options:

  • Choose the command from a menu (all registered commands can be found in Menu -> Edit -> Registered Commands).
  • In the Command prompt, type the name of the command.
  • In the Console (Menu -> Edit -> Console or Shift+C), call the command.

You can stop the command at any time by pressing ESC.

Interacting with commands

Some commands start work immediately after they are called. But some commands wait for actions from the user. Such commands show dialog boxes or display information in a command prompt. The structure of such a command in a command prompt is next:


command: command_name
Instruction text [Option1 Option2 ... OptionN] < Current Option >:

After this message you should choose one of these options:

  • Set a new option by typing its name or value and press Enter.
  • Keep the current option by pressing Enter.
  • Terminate the command by pressing ESC.

Repeating commands

You can repeat the last command by doing one of the following in OdaMfcApp:

  • Press Enter.
  • Go to Menu -> Edit -> ExecuteCommand "Last_command_name".

See Also

Working with Commands

Import and Export Commands

Copyright © 2002 – 2021. Open Design Alliance. All rights reserved.