Using Mscomm with Autolisp

Discussion in 'AutoCAD' started by Bruno, May 3, 2004.

  1. Bruno

    Bruno Guest

    Hello,

    Has anyone tried to use the mscomm library with autolisp?

    This is what I got until now:

    (defun loadmscomm ()
    (vlax-import-type-library
    :tlb-filename "c:\\winnt\\system32\\MSCOMM32.OCX"
    :methods-prefix "comm-"
    :properties-prefix "comp-"
    :constants-prefix "comc-")
    )

    (defun initcom ()
    (setq com1 (vlax-create-object "MSCommLib.MSComm"))
    ;; use com1
    (comp-put-commport com1 "1")
    ;; 9600 baud, no parity, 8 data, and 1 stop bit
    (comp-put-settings com1 "9600,N,8,1")
    )

    This is the part that will not work: (vlax-create-object
    "MSCommLib.MSComm")

    Is the string wrong? Do I need to have VB installed on the pc?

    The application I would like to implement is to couple a GPS-receiver
    to AutoCAD, now using 2004 MAP and LDT.

    Thanks,

    Bruno
     
    Bruno, May 3, 2004
    #1
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.