Acad Specific Functions
Tables, Common Entity Properties

Topics

Accessing and prompting for table names like layers and blocks. A lot of non-geometric properties of objects are stored in tables. User input functions ask for a property of an object, if it's a layer, a color or a block name.

We will define:

Independent

User Input

View Calculations

Miscellaneous

Layer Methods

There are table sections (BLOCK, LAYER, ...) and table entries (layers, blocks)

The tbl argument refers to a table section (uppercase string), table names are the names of entries. (instances)

Naming Conventions

STD-TBL- is for general table functions. STD-SAVE-/-RESTORE- functions for specific table handling. STD-TBL-GETxxx are user interactive functions and no table property accessors. Specific property accessors don't exist besides the four layer functions, only the generic STD-TBL returning the names and STD-TBL-PROPS for everything else.

Function Reference

Independent Accessors:

*TABLES* ; stringlist of all table sections

(STD-TBL-P tbl) ; valid table section?

(STD-TBL-GROUP tbl) ; dxf group matching tbl

(STD-TBL-NAMES tbl) ; list of defined names

(STD-TBL-PROPS tbl grp) ; list of properties by dxf group

(STD-TBL tbl match must ignore) ; general accessor

(STD-TBL-LAYER match must ignore ison) ; layer accessor

(STD-TBL-TMPNAME tbl prefix) ; creates new unique table name

(STD-TBL-RENAME tbl old new) ; rename a symbol table

User Input: (getting existing names) Should we provide this?

(STD-TBL-GETNAME tbl flag msg def) ; asks for table names

(STD-TBL-GETBLNAME msg def) ; single blockname

(STD-TBL-GETBLNAMES msg def) ; mult. blocknames

(STD-TBL-GETLTNAME msg def) ; mult. linetypes

(STD-TBL-GETCOLNAME msg def) ; mult. color names or numbers

(STD-TBL-GETCOLNR msg def) ; returns chosen color number

View Calculations:

(STD-PIX->UNITS pix) ;

(STD-UNITS->PIX num) ;

(STD-VIEW-PLAN-P) ; actual vport plan?

(STD-VIEW-PERSP-P) ; actual vport perspective?

(STD-PAPERSPACE-P) ; in paperspace?

(STD-VPORT-NEXT) ; switch to next vport

(STD-ZOOM-PTS) ; return box with vport pts

(STD-ZOOM-IF pt1 pt2) ; zoom to box if invisible

(STD-ZOOM-IF-APPLY pt1 pt2 func) ; apply func if box invisible

(STD-ZOOM-EXTENTS) ; zoom to extents if necessary, transparent

Miscellaneous: Predicates, Save/Restore Pairs

(STD-NOT-WORLDUCS-P) ;

(STD-LAYER-VISIBLE-P layname) ; on and thawed ?

(STD-LAYER-ON-P layname) ;

(STD-LAYER-FROZEN-P layname) ;

(STD-SAVE-LAYER laynam) ; => layer-state

(STD-RESTORE-LAYER layer-state) ;

(STD-SAVE-UCS) ; => ucs-state

(STD-RESTORE-UCS ucs-state) ;

(STD-SAVE-ZOOM) ; => zoom-pts

(STD-RESTORE-ZOOM zoom-pts) ;

(STD-SAVE-VIEW) ; => view-name

(STD-RESTORE-VIEW view-name) ;

(STD-SAVE-VPORTS) ; => vports-name

(STD-RESTORE-VPORTS vports-name) ;

(STD-SAVE-UNDO) ; => undoctl as number

(STD-RESTORE-UNDO undoctl) ; restore UNDOCTL state

(STD-ENABLE-UNDO) ; turn it on to normal state

(STD-DISABLE-UNDO) ; for faster operations but dangerous!

Layer Methods:

(STD-LAYER-MAKE name|list) ; Create/Set a layer w/ optional properties

(STD-LAYER-SET name) ; Set an existing layer current

(STD-LAYER-ON name|strlist) ; Turn it on

(STD-LAYER-OFF name|strlist) ; Turn it off

(STD-LAYER-THAW name|strlist) ;

(STD-LAYER-FREEZE name|strlist) ;

(STD-LAYER-LOCK name|strlist) ;

(STD-LAYER-UNLOCK name|strlist) ;

(STD-LAYER-THAW-VP name|strlist) ;

(STD-LAYER-FREEZE-VP name|strlist) ;

(STD-LAYER-PUT-COLOR name|strlist) ; Set a color

(STD-LAYER-PUT-LTYPE name|strlist) ; Set a linetype