Map 6, MAPATTACHDB, Link objects in LISP

Robert Broussard

Usenet Archive
Joined
Dec 31, 2003
Messages
1
Reaction score
0
I cannot use dbconnect with MYSQL because I get an error.

So would like to call the Map 6 command "MAPATTACHDB" and pass it my UDL file from AutoLISP thus attaching the database to the current drawing.

I've tried: (command "MAPATTACHDB" "my_UDL_file.udl")

but this simply pops of the "Attach Data Source" window killing all automation.

I'd also like to generate links using AutoLISP by maybe writing a function that takes in an entity name and some identifier for a database record. I'm using MYSQL and ADOLISP (www.fleming-group.com) for database access.

Any suggestions are greatly appreciated,

Robert
 
MAPATTACHDB won't work in a lisp routine because of the dialog box. There is no way around it. You can connect the database using CAO. It will not be displayed in the Project Workspace window, but it can be accessed through programming.

As far as linking items you can use the undocumented, unsupported function "MAP_CREATELINK"

(map_createlink ename linktemplate keyvalue)
where ename is the entity, linktemplate is the desired link template name and keyvalue contains the value of the key fields in a list

Robert Broussard said:
I cannot use dbconnect with MYSQL because I get an error.

So would like to call the Map 6 command "MAPATTACHDB" and pass it my UDL
file from AutoLISP thus attaching the database to the current drawing.
I've tried: (command "MAPATTACHDB" "my_UDL_file.udl")

but this simply pops of the "Attach Data Source" window killing all automation.

I'd also like to generate links using AutoLISP by maybe writing a function
that takes in an entity name and some identifier for a database record. I'm using MYSQL and ADOLISP (www.fleming-group.com) for database access.
 

Latest threads

Back
Top