Hyperlink in Lisp, Tool Palette or Menu?

Discussion in 'AutoCAD' started by bruceclement, Jan 18, 2005.

  1. bruceclement

    bruceclement Guest

    I'd like to create a hyperlink to a web page in a Tool Palette or as a menu item. IOW, I want to be able to click the tool (or pick the pulldown menu) and have it launch a web browser with a particular page current.

    I've had some success with startapp:

    (startapp "\"C:\\Program Files\\Internet Explorer\\IEXPLORE.EXE\"" "http://www.yahoo.com")

    But if I don't include the whole path to IEXPLORE.EXE it won't launch. I can't assume everyone will have IE installed in that folder. Findfile doesn't fine it, natch.

    Any ideas?

    TIA

    Bruce Clement
    http://www.bruceclement.com
     
    bruceclement, Jan 18, 2005
    #1
  2. Hi,

    There are two alternatives.

    HH

    and

    Browser

    I think you will find Browser more reliable.

    --

    Regards,


    Laurie Comerford
    www.cadapps.com.au
     
    Laurie Comerford, Jan 18, 2005
    #2
  3. Add this to your MNL file:

    (defun navigate (url / shell)
    (vl-load-com)
    (setq shell
    (vla-get-interfaceobject
    (vlax-get-acad-object)
    "Shell.Application"
    )
    )
    (vlax-invoke-method shell 'Open url)
    (vlax-release-object shell)
    )

    In your menu macro, you can just call
    the following:

    (Navigate "filename.htm")

    The file can be local or anywhere on the
    internet, in which case you would use a
    URL like http://www.caddzone.com/index.htm.
     
    Tony Tanzillo, Jan 18, 2005
    #3
  4. We use HH.exe extensively.
    It works like:
    (startapp "hh.exe" "-800
    k:/vdl2002/eglsp-help/wapening/disp-wabalkdsn2.html")
    The -800 is the size of the explorer window.
    Ofcourse any other URL can be used, thisone is an internal helpfile.
    Works like a charm.

    Jan


    menu item. IOW, I want to be able to click the tool (or pick the pulldown
    menu) and have it launch a web browser with a particular page current.
    can't assume everyone will have IE installed in that folder. Findfile
    doesn't fine it, natch.
     
    Jan van de Poel, Jan 18, 2005
    #4
  5. Thanks for another example, Tony


    vla-get-interfaceobject = vla-getinterfaceobject
     
    Jason Piercey, Jan 18, 2005
    #5
  6. bruceclement

    Dommy2Hotty Guest

    This is how I set up our custom menu:
    Code:
    [Visit our Website]^C^C^C_.browser;www.russcarlson.com;
     
    Dommy2Hotty, Jan 18, 2005
    #6
  7. Thanks for pointing that out (I do it quite often).
     
    Tony Tanzillo, Jan 18, 2005
    #7
  8. bruceclement

    bruceclement Guest

    bruceclement, Jan 18, 2005
    #8
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.