VLE... functions

vlisp-optimizer


activates or deactivates the built-in Lisp Optimiser

(vlisp-optimizer enable)

arguments (1):
enable
-when T : activates the built-in Lisp optimiser (default)
-when nil : deactivates the built-in Lisp optimiser for current file (after loading *this* file, it is automatically reset as t)


vle-entget


returns the entity's value for specified DXF groupcode

(vle-entget dxfcode ename)

arguments (2):
dxfcode
DXF groupcode to retrieve the property for

 

ename
entity to query

 



vle-entmod


sets the entity's value for specified DXF groupcode

(vle-entmod dxfcode ename value)

arguments (3):
dxfcode
DXF groupcode to set the property for

 

ename
entity to set the new value

 

value
new value to be set

 



vle-alert


sets the entity's value for specified DXF groupcode

(vle-alert title msg flags)

arguments (3):
title
title (caption) text to be displayed

 

msg
text to be displayed

 

flags
flags to control layout + behaviour of the mesage box (see Windows ::MessageBox() API) also explained in 'vle-extension.lsp' file

 



vle-startapp


similar to (startapp), runs "cmd" command with 'args' arguments on the OS shell; depending on "mode", it can run synchroneously (inlined) or asynchroneously (parallel)

(vle-startapp cmd [args] [mode])

arguments (3):
cmd
application or command to run

 

[args]
optional arguments (as string), or NIL if no extra arguments are used

 

[mode]
-when T runs asnychroneously (inlined) - Bricscad waits until 'cmd' is finished
-when NIL - runs snychroneously (parallel) - Bricscad does not wait until 'cmd' is finished


vle-selectionset->list


returns SelectionSet 'ss' members as a list

(vle-selectionset->list ss)

arguments (1):
ss
members as a list

 



vle-collection->list


returns a COM (VLA) Collection (i.e. IAcadLayers) 'coll' as a list

(vle-collection->list coll)

arguments (1):
coll
the COM (VLA) collection

 



vle-start-transaction


starts a database transaction; returns t on success

(vle-start-transaction)

only 1 transaction level is supported, nested calls have no effect



vle-end-transaction


finishes a previously started database transaction

(vle-end-transaction)

must be paired with (vle-start-transaction), even when nested; (vle-end-transaction) on a nested transaction level has no effect, only the outer-most (and only) transaction is finished; Lisp engine automatically ends an active transaction, i.e. in case or error, or when Lisp execution at top-level has finished



vle-displaypause


disabled or enables screen updates during Lisp execution

(vle-displaypause pauseScreen)

arguments (1):
pauseScreen
when T : disables screen updates
when nil : enables screen updates

Lisp engine automatically re-enables screen updates, i.e. in case or error, or when Lisp execution at top-level has finished.



vle-string-split


splits a string into tokens, using delimiter character(s) defined by 'keys'

(vle-string-split keys string)

arguments (2):
keys
delimiter character(s)

 

string
string to be split

 



vle-file->list


reads the entire content of a file into a single Lisp list

(vle-file->list filename commentchar)

arguments (2):
filename
file to split

 

commentchar
defines a comment specifier (if not NIL) - lines starting with that character are treated as comments, and not loaded into list

 



vle-nth0


returns the nth0 member of list lst

(vle-nth0 lst)

arguments (1):
lst
list

 

replacement functions for (nth 0 lst)



vle-nth1


returns the nth1 member of list lst

(vle-nth1 lst)

arguments (1):
lst
list

 

replacement function for (nth 1 lst)



vle-nth2


returns the nth2 member of list lst

(vle-nth2 lst)

arguments (1):
lst
list

 

replacement function for (nth 2 lst)



vle-nth3


returns the nth3 member of list lst

(vle-nth3 lst)

arguments (1):
lst
list

 

replacement function for (nth 3 lst)



vle-nth4


returns the nth4 member of list lst

(vle-nth4 lst)

arguments (1):
lst
list

 

replacement function for (nth 4 lst)



vle-nth5


returns the nth5 member of list lst

(vle-nth5 lst)

arguments (1):
lst
list

 

replacement function for (nth 5 lst)



vle-nth6


returns the nth6 member of list lst

(vle-nth6 lst)

arguments (1):
lst
list

 

replacement function for (nth 6 lst)



vle-nth7


returns the nth7 member of list lst

(vle-nth7 lst)

arguments (1):
lst
list

 

replacement function for (nth 7 lst)



vle-nth8


returns the nth8 member of list lst

(vle-nth8 lst)

arguments (1):
lst
list

 

replacement function for (nth 8 lst)



vle-nth9


returns the nth9 member of list lst

(vle-nth9 lst)

arguments (1):
lst
list

 

replacement function for (nth 9 lst)



vle-cdrassoc


returns the (cdr) value of a dotted-pair with 'key'

(vle-cdrassoc key lst)

arguments (2):
key
key

 

lst
list

 

replacement for (cdr (assoc key lst))

alias: (vle-get-cdrassoc) (vle-cassoc) (vle-get-cassoc)



vle-set-cdrassoc


changes the (cdr) value of a dotted-pair [key . value] to use new value 'val'

(vle-set-cdrassoc key lst val)

arguments (3):
key
key

 

lst
list

 

val
new value

 

replacement for (subst (cons key val) (assoc key lst) lst)

alias: (vle-set-cassoc)



vle-member


verifies whether 'obj' is contained in 'lst'

(vle-member obj lst)

arguments (2):
obj
element

 

lst
list

 

replacement for (subst (cons key val) (assoc key lst) lst)

alias: (vle-find)



vle-remove-first


removes the first occurence of 'item' in 'lst', and returns modified list

(vle-remove-first item lst)

arguments (2):
item
item to remove

 

lst
list

 



vle-remove-all


removes all occurences of 'item' within 'lst', and returns modified list

(vle-remove-all item lst)

arguments (2):
item
item to remove

 

lst
list

 

(vle-remove-all) is identical to (vl-remove) function, included for consistency



vle-remove-last


removes the last item from 'lst' list

(vle-remove-last lst)

arguments (1):
lst
list

 

replacement for (reverse (cdr (reverse lst)))



vle-remove-nth


removes the item at specified index 'idx' (0-based) from 'lst' list

(vle-remove-nth idx lst)

arguments (2):
idx
index (0-based)

 

lst
list

 

alias: (vle-remove-idx)



vle-search


verifies whether 'item' is contained in list 'lst'

(vle-search item lst asIdx)

arguments (3):
item
target item

 

lst
list

 

asIdx
when T : returns the index (0-based), or NIL when no match
when nil : returns the sublist starting with item, or NILwhen no match


vle-sublist


returns a sublist of 'lst' starting with item at position 'startidx'

(vle-sublist lst startidx nritems)

arguments (3):
lst
target item

 

startidx
start index (0-based)

 

nritems
number of items to include

 



vle-subst-nth


replaces the item at index 'idx' n list 'lst' with 'val'

(vle-subst-nth lst idx val)

arguments (3):
lst
target item

 

idx
index (0-based)

 

val
replacement value

 

alias: (vle-replace)



vle-stringp


verifies whether 'obj' is of type STRING

(vle-stringp obj)

arguments (1):
obj
object to test

 



vle-numberp


verifies whether 'obj' is of any number type

(vle-numberp obj)

arguments (1):
obj
object to test

 

(vle-numberp) is identical to (numberp) function



vle-realp


verifies whether 'obj' is of type REAL

(vle-realp obj)

arguments (1):
obj
object to test

 



vle-integerp


verifies whether 'obj' is of type INTEGER

(vle-integerp obj)

arguments (1):
obj
object to test

 



vle-filep


verifies whether 'obj' is of type FILE

(vle-filep obj)

arguments (1):
obj
object to test

 



vle-enamep


verifies whether 'obj' is of type ENAME

(vle-enamep obj)

arguments (1):
obj
object to test

 



vle-vlaobjectp


verifies whether 'obj' is of type VLA-OBJECT

(vle-vlaobjectp obj)

arguments (1):
obj
object to test

 



vle-variantp


verifies whether 'obj' is of type VARIANT

(vle-variantp obj)

arguments (1):
obj
object to test

 



vle-safearrayp


verifies whether 'obj' is of type SAFEARRAY

(vle-safearrayp obj)

arguments (1):
obj
object to test

 



vle-stringp


verifies whether 'obj' is of type STRING

(vle-stringp obj)

arguments (1):
obj
object to test

 

 
© Menhirs NV. All rights reserved.