Results 1 to 2 of 2

Thread: "error: Visual LISP command document mismatch" when using vlax-add-cmd

  1. #1
    Member
    Join Date
    2015-01
    Posts
    43
    Login to Give a bone
    0

    Default "error: Visual LISP command document mismatch" when using vlax-add-cmd

    I wrote a LISP routine called 'AngleInterceptPoint' which accepts a base-point (as an argument) and prompts the user for a specified angle and a selected line or pline segment. It then calculates the intercept of the selected line and the base-point through the specified angle. (I use this routine in other LISP programs.)

    I recently wrote a second LISP routine called '#IPL' (with no arguments) which calls up 'AngleInterceptPoint' and supplies (getvar "LASTPOINT") as the base-point argument. I want to use #IPL to create a transparent command using vlax-add-cmd. My acaddoc.lsp file loads IPL.lsp which contains the following code:

    (defun #IPL ( / ) (AngleInterceptPoint (getvar "LASTPOINT")))
    (vlax-add-cmd "IPL" '#IPL "IPL" ACRX_CMD_TRANSPARENT)

    (AngleInterceptPoint pt) works fine and (#IPL) works fine but 'IPL' returns "error: Visual LISP command document mismatch".

    The Autodesk Knowledge Network article on vlax-add-cmd talks about recommending using a separate VLX namespace to load these functions but I'm not familiar with VLX namespace concepts beyond vl-bb-ref & vl-bb-set.

    As always, any help is greatly appreciated.

  2. #2
    Member
    Join Date
    2015-01
    Posts
    43
    Login to Give a bone
    0

    Default Re: "error: Visual LISP command document mismatch" when using vlax-add-cmd

    After experimenting with this, I stumbled across the problem which is just that some global names work and some global names don't 'IPL' doesn't work but 'IL' does work. Go figure. I suspect that 'IPL' is already registered by something else but I don't know how to find out which names are not available.

Similar Threads

  1. Replies: 2
    Last Post: 2016-12-22, 01:02 PM
  2. Replies: 8
    Last Post: 2012-08-18, 01:31 AM
  3. Visual Lisp - Questions on vla- and vlax- command prefixes
    By sivampeta_dheeraj in forum AutoLISP
    Replies: 12
    Last Post: 2012-02-24, 03:27 AM
  4. Book "AutoLisp and Visual Lisp primer", recommended or not
    By thomas.huckabee in forum AutoLISP
    Replies: 0
    Last Post: 2007-05-02, 02:06 PM
  5. Error "Failed to Save Document"
    By dgraue in forum Revit Architecture - General
    Replies: 3
    Last Post: 2005-11-17, 08:03 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
  •