VS:DBDocGetDB

From Vectorworks Developer
Jump to: navigation, search

.VectorScript|VectorScript ..VS:Function Reference|Function Reference ..VS:Function_Reference_Appendix|Appendix

Description

Returns a string representing a ';' delimited list of the databases currently connected to the document.
FUNCTION DBDocGetDB(
VAR outDatabases  :DYNARRAY[] OF CHAR) : BOOLEAN;
def vs.DBDocGetDB():
    return (BOOLEAN, outDatabases)

Parameters

outDatabases DYNARRAY[] of CHAR

Remarks

( Orso 2010 Sep. 27): Some observations:
  • no database connections in the document: returns FALSE
  • one database connected to the document: the string won't end with colon ";".
  • more databases connected: colon-separated string of database names.

Example

VectorScript

PROCEDURE ODBCtest;
    VAR
        outDatabases : DYNARRAY [] OF CHAR;
BEGIN
    outDatabases := '';	
    IF DBDocGetDB(outDatabases) THEN BEGIN
        AlrtDialog(outDatabases); { colon-separated list of databases, if more than one }
        { .... }
    END;
END;
RUN(ODBCtest);

Python

def ODBCtest():
	outDatabases = ''	
	hasDB,  outDatabases= vs.DBDocGetDB()
	if hasDB:
		vs.AlrtDialog(outDatabases); #{ colon-separated list of databases, if more than one }
ODBCtest()

Version

Availability: from Vectorworks 2011
Personal tools
NamespacesFFFF

Variants
Actions
Advanced Search
See Also
Navigation
Toolbox