Map 6, MAPATTACHDB, Link objects in LISP

Discussion in 'AutoCAD' started by Robert Broussard, Dec 31, 2003.

  1. 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
     
    Robert Broussard, Dec 31, 2003
    #1
  2. Robert Broussard

    Jim Claypool Guest

    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


    file from AutoLISP thus attaching the database to the current drawing.
    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.
     
    Jim Claypool, Dec 31, 2003
    #2
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.