in the command-line not show the makroname

Discussion in 'AutoCAD' started by Hartmut Callies, Aug 23, 2004.

  1. Hello,
    I have a vba-program with AutoCAD 2000. With a pulldown-menu
    I start the commands. In the command-line from AutoCAD can
    everyone see:
    command: -vbarun
    makroname: Commandhelp
    What can I do, that the command-line do not show the makroname?
    (commandline on/off)

    Thanks.

    Hartmut
     
    Hartmut Callies, Aug 23, 2004
    #1
  2. Hi,

    Attached is an extract of one of our MNL files showing how you can achieve
    this. The menu file merely calls the lisp function name defined here.

    Note that our installation program writes the installed location to the
    registry. For local use you may care to hardcode the path to the program.

    The lisp also provides to run different versions of the program depending on
    which version of AutoCAD is loaded and hence we can use one menu for all
    versions of Land Desktop.


    --


    Laurie Comerford
    CADApps
    www.cadapps.com.au

    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;; Advanced Road Design ;;
    ;; Started sorting into Alphabetical order to make easier to find ;;
    ;; Lisp function definitions for calling from menu ;;
    ;; Prepared by Laurie Comerford 19 Feb 2003 ;;
    ;; Modified to simplify 1 May 2003 and additional user notes added ;;
    ;; Modified 23 June 2003 to add CADAppsCleanCommandLine capabiliies ;;
    ;; Modified 5 Sept 2003 to reflect new sewer processes and delete ;;
    ;; irrelevant ones
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;; User notes: ;;
    ;; If the menu does not install correctly the lines ;;
    ;; (vl-registry-read "HKEY_LOCAL_MACHINE\\Software\\CADApps\\Advanced Road
    Design 2004\\" "InstallPath")
    ;; ;;
    ;; can be replaced with the installation path of the Advanced Road ;;
    ;; software in the general format ;;
    ;; c:\\Program Files\\CADApps ;;
    ;; ;;
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;; First set the string variables which prefix the individual commands ;;
    ;; The InstallPath is written to the registry by the installation ;;
    ;; program. When the AdvancedRoad-v5.mns file is loaded, so is this ;;
    ;; file and the variables "sPBRoadProgram", "sPBSewerProgram" and ;;
    ;; "sPBDrainProgram" are ceated. Each of the functions uses these ;;
    ;; variables to run the program macros ;;
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


    (setq curversion (atof (SUBSTR (getvar "acadver") 1 5)))


    ;; Provide to run other programs by getting the path to the file
    (setq sOtherProgramsPath
    (cond
    ((< curversion 16.0)
    (strcat (vl-registry-read "HKEY_LOCAL_MACHINE\\Software\\CADApps\\Advanced
    Road Design" "InstallPath")
    "\\Bloomfield\\Programs\\"))

    ((= curversion 16.0)
    (strcat (vl-registry-read "HKEY_LOCAL_MACHINE\\Software\\CADApps\\Advanced
    Road Design 2004" "InstallPath")
    "\\Bloomfield\\Programs\\"))

    ((= curversion 16.1)
    (strcat (vl-registry-read "HKEY_LOCAL_MACHINE\\Software\\CADApps\\Advanced
    Road Design 2004" "InstallPath")
    "\\Bloomfield\\Programs\\"))

    (T
    (strcat (vl-registry-read "HKEY_LOCAL_MACHINE\\Software\\CADApps\\Advanced
    Road Design 2004" "InstallPath")
    "\\Bloomfield\\Programs\\"))
    )
    )

    ;; Provide to run ancillary programs by setting the version with Laurie's
    file naming convention

    (setq sProgramsVersion
    (cond
    ((< curversion 16.0) "L3.dvb!")

    ((= curversion 16.0) "L4.dvb!")

    ((= curversion 16.1) "L5.dvb!")

    (T "L5")
    )
    )

    (setq sPBRoadProgram
    (cond
    ((< curversion 16.0)
    (strcat (vl-registry-read "HKEY_LOCAL_MACHINE\\Software\\CADApps\\Advanced
    Road Design" "InstallPath")
    "\\Bloomfield\\Programs\\Road-2003-v5.dvb!"))

    ((= curversion 16.0)
    (strcat (vl-registry-read "HKEY_LOCAL_MACHINE\\Software\\CADApps\\Advanced
    Road Design 2004" "InstallPath")
    "\\Bloomfield\\Programs\\Road-2004-V5.dvb!"))

    ((= curversion 16.1)
    (strcat (vl-registry-read "HKEY_LOCAL_MACHINE\\Software\\CADApps\\Advanced
    Road Design 2004" "InstallPath")
    "\\Bloomfield\\Programs\\Road-2005-V5.dvb!"))

    (T
    (strcat (vl-registry-read "HKEY_LOCAL_MACHINE\\Software\\CADApps\\Advanced
    Road Design 2004" "InstallPath")
    "\\Bloomfield\\Programs\\Road-2005-V5.dvb!"))
    )
    )


    (setq sPBDrainProgram
    (cond
    ((< curversion 16.0)
    (strcat (vl-registry-read "HKEY_LOCAL_MACHINE\\Software\\CADApps\\Advanced
    Road Design" "InstallPath")
    "\\Bloomfield\\Programs\\Drain-2003-v5.dvb!"))

    ((= curversion 16.0)
    (strcat (vl-registry-read "HKEY_LOCAL_MACHINE\\Software\\CADApps\\Advanced
    Road Design 2004" "InstallPath")
    "\\Bloomfield\\Programs\\Drain-2004-v5.dvb!"))

    ((= curversion 16.1)
    (strcat (vl-registry-read "HKEY_LOCAL_MACHINE\\Software\\CADApps\\Advanced
    Road Design 2004" "InstallPath")
    "\\Bloomfield\\Programs\\Drain-2005-v5.dvb!"))

    (T
    (strcat (vl-registry-read "HKEY_LOCAL_MACHINE\\Software\\CADApps\\Advanced
    Road Design 2004" "InstallPath")
    "\\Bloomfield\\Programs\\Drain-2005-v5.dvb!"))
    )
    )


    (setq sPBSewerProgram
    (cond
    ((< curversion 16.0)
    (strcat (vl-registry-read "HKEY_LOCAL_MACHINE\\Software\\CADApps\\Advanced
    Road Design" "InstallPath")
    "\\Bloomfield\\Programs\\Sewer-2003-v5.dvb!"))

    ((= curversion 16.0)
    (strcat (vl-registry-read "HKEY_LOCAL_MACHINE\\Software\\CADApps\\Advanced
    Road Design 2004" "InstallPath")
    "\\Bloomfield\\Programs\\Sewer-2004-v5.dvb!"))

    ((= curversion 16.1)
    (strcat (vl-registry-read "HKEY_LOCAL_MACHINE\\Software\\CADApps\\Advanced
    Road Design 2004" "InstallPath")
    "\\Bloomfield\\Programs\\Sewer-2005-v5.dvb!"))

    (T
    (strcat (vl-registry-read "HKEY_LOCAL_MACHINE\\Software\\CADApps\\Advanced
    Road Design 2004" "InstallPath")
    "\\Bloomfield\\Programs\\Sewer-2005-v5.dvb!"))
    )
    )

    (defun CADAppsCleanCommandLine (spFunctionString)
    (setq n (strlen spFunctionString))
    (repeat n (princ (chr 8))) (repeat n (princ (chr 32)))
    (princ)
    )
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ; Help functions
    ; Browser is an AutoCAD function designed to run the current Web Browser
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

    (defun C:v5RoadHelp ()
    (setq strRoadHelp
    (Strcat
    (vl-registry-read "HKEY_LOCAL_MACHINE\\Software\\CADApps\\Advanced
    Road Design 2004\\" "InstallPath")
    "\\Bloomfield\\Help Advanced Road Design\\index.htm"
    )
    )
    (command "_Browser" strRoadHelp)
    ) ; end Defun RoadHelp

    (defun C:v5DrainHelp ()
    (setq strDrainHelp
    (Strcat
    (vl-registry-read "HKEY_LOCAL_MACHINE\\Software\\CADApps\\Advanced
    Road Design 2004\\" "InstallPath")
    "\\Bloomfield\\Help Advanced Road Drainage\\index.htm"
    )
    )
    (command "_Browser" strDrainHelp)
    ) ; end Defun DrainHelp

    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ; ARX Programs
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

    (progn
    (If (< curversion 16.0) ; ie R3 so set the correct name for R3 ARX file
    in next statement
    (setq sLoadBzhArxTools (strcat
    (vl-registry-read "HKEY_LOCAL_MACHINE\\Software\\CADApps\\Advanced
    Road Design 2004" "InstallPath")
    "\\Bloomfield\\Programs\\BzhArxTools2004.arx"
    )) ; End Strcat & setq
    (setq sLoadBzhArxTools (strcat
    (vl-registry-read "HKEY_LOCAL_MACHINE\\Software\\CADApps\\Advanced Road
    Design 2004" "InstallPath")
    "\\Bloomfield\\Programs\\BzhArxTools2004.arx"
    )) ; End Strcat & setq
    ) ; End if

    (arxload sLoadBzhArxTools (Princ "ARD ARX load failed"))

    (CADAppsCleanCommandLine sLoadBzhArxTools)
    ) ; End progn

    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ; Road Programs
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

    (defun C:v5aBatterAdjust ()
    (setq sPBFunction (strcat sPBRoadProgram "aBatterAdjust"))
    (vl-vbarun sPBFunction)
    (CADAppsCleanCommandLine sPBFunction)
    ) ; end Defun aBatterAdjust
     
    Laurie Comerford, Aug 23, 2004
    #2
  3. In addition to Laurie's suggestion, you can try toggling the NOMUTT
    variable on/off.

    -- Mike
    ___________________________
    Mike Tuersley
    CADalyst's CAD Clinic
    Rand IMAGINiT Technologies
    ___________________________
    the trick is to realize that there is no spoon...
     
    Mike Tuersley, Aug 24, 2004
    #3
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.