Results 1 to 6 of 6

Thread: Working with Visual Lisp and VBA - pass an object ID or entity handle to VBA

  1. #1
    AUGI Director cadpoobah's Avatar
    Join Date
    2015-09
    Location
    Central Ohio
    Posts
    437
    Login to Give a bone
    0

    Default Working with Visual Lisp and VBA - pass an object ID or entity handle to VBA

    I am not a VBA programmer, but am working with one. I have a lisp routine that needs to pass an object ID or entity handle to VBA.

    I know that there are ways to use the USERx# variables to allow VBA to grab something set by VL, but I don't think this will work with an object ID. I've also heard it suggested to use the Blackboard in Visual Lisp. I'm not familiar with that.

    So, rather than spend a whole lot of time spinning my wheels, I'm going to take the efficient (humble) route and ask for help.

    Any suggestions?

    Thanks!

  2. #2
    Administrator Ed Jobe's Avatar
    Join Date
    2000-11
    Location
    Turlock, CA
    Posts
    6,420
    Login to Give a bone
    0

    Default Re: Working with Visual Lisp and VBA - pass an object ID or entity handle to VBA

    ObjectId's and Handle's are just strings. USERS should work fine if thats the way you want to do it. I prefer to use vb to get an instance of the VL interface and just run the lisp from vba. Search this forum form vlax.cls for a wrapper class that allows you to work with lisp.

    BTW ,the BB is only available to lisp, not vba...unless you use the method above and then the point is useless. Lisp runs in the document context and so the bb is used to pass variables from one document context to another...all within lisp. VBA doesn't have this limitation.
    Last edited by Ed Jobe; 2007-04-27 at 09:27 PM.
    C:> ED WORKING....


    LinkedIn

  3. #3
    All AUGI, all the time zoomharis's Avatar
    Join Date
    2005-02
    Location
    Abu Dhabi (Native-India)
    Posts
    506
    Login to Give a bone
    0

    Default Re: Working with Visual Lisp and VBA - pass an object ID or entity handle to VBA

    Quote Originally Posted by Ed Jobe
    ObjectId's and Handle's are just strings.
    Hi Ed Jobe,
    I am afraid that it's long, not string. By the way, is it possible to store data in a custom dictionary using LISP and access it using VBA or vice versa?

  4. #4
    I could stop if I wanted to
    Join Date
    2002-02
    Location
    Kansas
    Posts
    487
    Login to Give a bone
    0

    Default Re: Working with Visual Lisp and VBA - pass an object ID or entity handle to VBA

    Quote Originally Posted by zoomharis
    Hi Ed Jobe,
    I am afraid that it's long, not string. By the way, is it possible to store data in a custom dictionary using LISP and access it using VBA or vice versa?
    Yes to this one

  5. #5
    AUGI Director cadpoobah's Avatar
    Join Date
    2015-09
    Location
    Central Ohio
    Posts
    437
    Login to Give a bone
    0

    Default Re: Working with Visual Lisp and VBA - pass an object ID or entity handle to VBA

    Quote Originally Posted by Ed Jobe
    ObjectId's and Handle's are just strings. USERS should work fine if thats the way you want to do it. I prefer to use vb to get an instance of the VL interface and just run the lisp from vba. Search this forum form vlax.cls for a wrapper class that allows you to work with lisp.
    Thanks for the quick reply, Ed.

    IN this case, I will need to keep it so that lisp calls vba. Does this mean then that I can't use (or don't need) VLAX.cls?

    If I want to pass a Handle to vb (as a string via a USERS# variable), then I assume that vb can use the handle to the select the object it needs. True? How?

  6. #6
    Administrator Ed Jobe's Avatar
    Join Date
    2000-11
    Location
    Turlock, CA
    Posts
    6,420
    Login to Give a bone
    0

    Default Re: Working with Visual Lisp and VBA - pass an object ID or entity handle to VBA

    See the Developer Guide for the HandleToObjectId and ObjectIdToObject methods.
    C:> ED WORKING....


    LinkedIn

Similar Threads

  1. Replies: 4
    Last Post: 2014-11-14, 04:01 AM
  2. CP33-2: A Visual LISP Wizard's Intor to Object Magic
    By Autodesk University in forum Customization and Programming
    Replies: 0
    Last Post: 2013-04-08, 07:20 PM
  3. Object snaps not working in lisp routines in 2012
    By jrp.31023 in forum AutoLISP
    Replies: 5
    Last Post: 2012-11-01, 06:39 AM
  4. visual lisp editor should be like visual studio
    By Wish List System in forum AutoCAD Wish List
    Replies: 1
    Last Post: 2011-11-17, 05:33 PM
  5. Dockable Interface, Object Browser, Object handle ideas...
    By Richard McCarthy in forum Revit Architecture - Wish List
    Replies: 6
    Last Post: 2003-10-08, 05:49 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •