Skip to content

VBA Macro Commands

R3Survey includes a set of shortcut commands that run VBA macros stored in the drawing template. These are thin wrappers — typing the command triggers the corresponding VBA routine via AutoCAD's RunMacro API.

Note

VBA macro commands require the R3Survey VBA project to be loaded in the drawing. If the VBA project is not present, the command will show a message and do nothing.

Native replacements

Some older VBA shortcuts have been replaced by native R3Survey commands: use R3DIMS instead of the old DIMS, and R3FO instead of the old FO.


Block insertion commands

Command VBA Macro Description
A0 BlockRef_Insert_A0 Insert A0 title block reference
A1 BlockRef_Insert_A1 Insert A1 title block reference
A2 BlockRef_Insert_A2 Insert A2 title block reference
A3 BlockRef_Insert_A3 Insert A3 title block reference
A4 BlockRef_Insert_A4 Insert A4 title block reference
A4I BlockRef_Insert_A4_Ident Insert A4 identity block reference
BC Blockref_Insert_BDYCIR Insert boundary circle symbol
NO BlockRef_Insert_Standard_Notes Insert standard notes block
NOD BlockRef_Insert_Detail_Notes Insert detail notes block
NOR BlockRef_Insert_North Insert north point block
PF1 Blockref_Insert_PF1 Insert plan format 1 block
PF2 Blockref_Insert_PF2 Insert plan format 2 block
PF3 Blockref_Insert_PF3 Insert plan format 3 block
PM Blockref_Insert_PM Insert PM (primary monument) block
RM Blockref_Insert_RMCIR Insert reference mark circle symbol
SIG BlockRef_Insert_Signature Insert signature block
SIG2 BlockRef_Insert_Signature2 Insert second signature block
SOP BlockRef_Insert_SOP Insert SOP stamp block
SP2 Blockref_Insert_SPF2 Insert SPF2 block
WAE BlockRef_Insert_WAE_Stamp Insert WAE stamp block

Dimension style commands

Command VBA Macro Description
FCE DimensionStyle_FCE Set FCE dimension style
OB DimensionStyle_OverBdy Set over-boundary dimension style
W1 DimensionStyle_WB_Opt1 Set WB dimension style option 1
W2 DimensionStyle_WB_Opt2 Set WB dimension style option 2

Scale commands

Command VBA Macro Description
UP ScaleUP Scale up — increase drawing scale
DN ScaleDN Scale down — decrease drawing scale
SM MatchScales Match scale to a reference

See R3DWGSCALE for the underlying drawing scale setting.


Text commands

Command VBA Macro Description
AB Text_Add_Brackets Add brackets around selected text
ELT ElevationText Insert elevation text
PW TextString_PartyWall Insert party wall text string
SB Split_Brg_To_Parts Split bearing text into degree/minute/second parts
SW SwapTextPosn Swap text position
TAL Text_Alter Alter selected text
WT Text_Expand Expand text (widen character spacing)
XT Explode_Text_to_Parts Explode text into individual character objects

Hatch commands

Command VBA Macro Description
H1 Insert_Hatch1 Insert hatch pattern 1
H2 Insert_Hatch2 Insert hatch pattern 2
H3 Insert_Hatch3 Insert hatch pattern 3
H4 Insert_Hatch4 Insert hatch pattern 4
H5 Insert_Hatch5 Insert hatch pattern 5
H6 Insert_Hatch6 Insert hatch pattern 6
H7 Insert_Hatch7 Insert hatch pattern 7

Drawing / geometry commands

Command VBA Macro Description
ALL Align_Line_to_Line Align one line to another
ALLW Align_All_Windows Align all paper space viewports
ALT Align_Text_to_Line Align text to a selected line
CA Block_CopyAttributes Copy attributes from one block to another
EASE AddEasements_New Add easement annotations
EXT Add_Extension_Lines Add extension lines to dimensions
HS Add_Data_HouseDesc Add house description data
LAY Insert_Layout_v2 Insert a paper space layout
LBL Add_Lines_between_Lines Add intermediate lines between two lines
LC Lines_to_Curve Convert two lines to an arc
LCC Lines_to_Circle Convert lines to a circle
LST ToggleLayerStates Toggle saved layer states
MGA Convert_MGAGrid_to_Ground Convert MGA grid coordinates to ground
PER Add_Perpendicular_Line Add a perpendicular line
R1 Convert_Diag_To_Rectangle Convert diagonal to a rectangle
R2 Convert_Cnr_To_Rect Convert corner points to a rectangle
R4 Convert_Quad_To_Rect Convert a quadrilateral to a rectangle
RED AddRedBdyLine Add a red boundary line
SPF SplitFloors Split floor levels
STP StepLines Create step lines
TZ Send_to_Zero Move selected objects to Z=0
USB GetRawDataFromUSB Read raw survey data from USB drive
WALL Add_Wall Add a wall element
WIN Add_Window Add a window element
XRP Set_Xref_PlotStyle Set plot style for all Xrefs

See also