Command Interface Home

LiteCAD's command interface promotes the easy creation of a fully functional CAD application. Almost all functionality can be accessed via the lcWndExeCommand function.  In contrast to programmatically managing entities, the command interface permits interactive editing, using the mousepointer and keyboard.  These interactive commands can be assigned directly to an application's menus, buttons and accelerator keys. 

For example, an application might have a menu item "Draw Line".  LiteCAD has a function lcBlockAddLine that creates a line, but this function requires endpoints coordinates as arguments, therefore the programmer must write code that allows these coordinates to be passed to the function.  Meanwhile, the command interface can be used instead, which only requires one line of code for the menu selection: lcWndExeCommand( hWnd, LC_CMD_LINE, 0 ) .  When the user selects this menu item, he can draw a line in the LiteCAD window using the mousepointer. 


List of commands identifiers


Value Meaning

File
LC_CMD_FILENEW New drawing
LC_CMD_FILEOPEN Call dialog "Select File" to load a drawing from a file
LC_CMD_FILEINSERT Call dialog "Select File" to insert a drawing into current drawing
LC_CMD_FILERECENT Call dialog "Recent Files List"
LC_CMD_FILESAVE Save drawing to file. Call dialog "Save As" if filename is undefined
LC_CMD_FILESAVEAS Call dialog "Save File As"
LC_CMD_PRINT Call dialog "Print"
LC_CMD_RASTERIZE Export a drawing into raster image

View drawing   
LC_CMD_ZOOM_IN Enlarge drawing's view
LC_CMD_ZOOM_OUT Diminish drawing's view
LC_CMD_ZOOM_EXT Zoom on drawing extents
LC_CMD_ZOOM_WIN
LC_CMD_ZOOM_RECT
Zoom drawing using the Zoom rectangle (Zoom Box)
LC_CMD_ZOOM_PREV Show the previous view
LC_CMD_ZOOM_SEL Show all selected entities
LC_CMD_PAN_LEFT Shift drawing to the right
LC_CMD_PAN_RIGHT Shift drawing to the left
LC_CMD_PAN_UP Shift drawing downward
LC_CMD_PAN_DOWN Shift drawing upward
LC_CMD_PAGENEXT Display next layout
LC_CMD_PAGEPREV Display previous layout
LC_CMD_PAGEMODEL Display "Model Space" layout

Format   
LC_CMD_LAYER Call dialog "Layers"
LC_CMD_LAYERORD Call dialog "Layers order"
LC_CMD_COLOR Call dialog "Color"
LC_CMD_FCOLOR Call dialog "Filling Color"
LC_CMD_LINETYPE Call dialog "Linetypes"
LC_CMD_TEXTSTYLE Call dialog "Text Styles"
LC_CMD_PNTSTYLE Call dialog "Point Styles"
LC_CMD_DIMSTYLE Call dialog "Dimension Styles"
LC_CMD_FILLING Call dialog "Filling Styles"
LC_CMD_IMAGE Call dialog "Raster Images Manager"
LC_CMD_BLOCKS Call dialog "Blocks"
LC_CMD_LAYOUT Call dialog "Layouts"
LC_CMD_BLOCK
LC_CMD_CREBLOCK
Create a Block from selected entities
LC_CMD_DRWPRM Call dialog "Drawing's parameters"

Add graphic objects to a drawing   
LC_CMD_POINT Draw Point
LC_CMD_LINE Draw Line
LC_CMD_XLINE Draw Constuction line
LC_CMD_POLYLINE
LC_CMD_PLINE
Draw Polyline
LC_CMD_SPLINE Draw Polyline with LC_PROP_PLINE_FIT = LC_PLFIT_SPLINE
LC_CMD_RPOLYGON Draw Regular polygon (equilateral closed polyline)
LC_CMD_SPLINE Draw Spline
LC_CMD_RECT Draw Rectangle
LC_CMD_CIRCLE Draw Circle
LC_CMD_ARC Draw Arc
LC_CMD_ELLIPSE Draw Ellipse
LC_CMD_SHAPE Draw Shape
LC_CMD_SPIRAL Draw Spiral
LC_CMD_TEXT Draw Text
LC_CMD_ATEXT
LC_CMD_ARCTEXT
Draw Arc Text
LC_CMD_MTEXT Draw Multiline Text
LC_CMD_BARCODE Draw Barcode
LC_CMD_DIMLIN
LC_CMD_DIMROT
Draw Dimension linear (rotated)
LC_CMD_DIMALI Draw Dimension aligned
LC_CMD_DIMORD Draw Dimension ordinate
LC_CMD_DIMRAD Draw Dimension radius
LC_CMD_DIMDIA Draw Dimension diameter
LC_CMD_DIMANG Draw Dimension angular
LC_CMD_LEADER Draw Leader
LC_CMD_ARROW Draw Arrow
LC_CMD_HATCH Draw Hatch
LC_CMD_IMAGE Insert Raster Image
LC_CMD_ECW Insert ECW / Jpeg2000 Image
LC_CMD_INSERT
LC_CMD_BLOCKREF
Insert Block reference
LC_CMD_VPORT
LC_CMD_VIEWPORT
Insert Viewport
LC_CMD_FACE Draw 3D Face

Edit operations   
LC_CMD_UNDO Undo last change
LC_CMD_REDO Reverse last "undo"
LC_CMD_CBCUT Cut entities to clipboard
LC_CMD_CBCOPY Copy entities to clipboard
LC_CMD_CBPASTE Paste entities from clipboard
LC_CMD_ERASE Erase entities
LC_CMD_COPY Copy entities
LC_CMD_MOVE Move entities
LC_CMD_ROTATE Rotate entities
LC_CMD_SCALE Scale entities
LC_CMD_MIRROR Mirror entities
LC_CMD_EXPLODE Explode entities
LC_CMD_SPLIT Split entities
LC_CMD_JOIN Join entities
LC_CMD_TRIM Trim entities
LC_CMD_EXTEND Extend entities
LC_CMD_BREAK Break entities
LC_CMD_OFFSET Offset entities
LC_CMD_FILLET Insert fillet arc between lines, arcs, circles
LC_CMD_ORDER Change entities order
LC_CMD_ALIGN Align entities
LC_CMD_CLOSEBLOCK Exit from Close "Edit Block" mode
LC_CMD_BASEPOINT Set position of a block basepoint
LC_CMD_IMGRES Set resolution of selected raster image
LC_CMD_IMGPOS Set position and rotation of selected raster image

Magnifier   
LC_CMD_MAG... See here...

Triangulated Irregular Network (TIN)   
LC_CMD_TIN_... See here...

Miscellaneous   
LC_CMD_GRID Call dialog "Coordinate Grid"
LC_CMD_OSNAP Call dialog "Object Snap"
LC_CMD_PTRACK Call dialog "Polar Tracking"
LC_CMD_SELOPTS Call dialog "Selection Options"
LC_CMD_KBMOVE Call dialog "Move entities by keyboard"
LC_CMD_DIST Measure distance
LC_CMD_AREA Measure Area
LC_CMD_HELP Display Context Help
LC_CMD_RESET Cancel currently active command, de-select all entities, redraw drawing
LC_CMD_SW_GRID Switch on/off "Show coordinate grid" mode
LC_CMD_SW_GRIDSNAP Switch on/off "Snap to coordinate grid" mode
LC_CMD_SW_OSNAP Switch on/off "Object Snap" mode
LC_CMD_SW_PTRACK Switch on/off "Polar tracking" mode
LC_CMD_SW_ORTHO Switch on/off "Ortho" mode
LC_CMD_CLIPRECTS Call dialog "Clipping Rectangles"
LC_CMD_PLUGINS Call dialog "Plugins"
  

See also

  Custom commands