ALTERNATIVE_ACADDOC_v2_02........................free

This program is a manager of plugins that the user can load in one file to a startup suit in "Load/Unload Applications" dialog window (command APPLOAD).
I contains legible list of lisp files at the bottom that dont have to be written with double backslashes.
Adding second backslash (to be understood by Autolisp) each time the user or programmer changes a version of a particuler lisp can be iritating, so this program adds it automatically while reading this file by autocad. The user has to put double backslashes only in the first line of the program (its own location). After loading the user can press F2 to check if all aplications loaded succesfully or to check what version of particular application is loaded (if the name contains version number). The list of lisp files at he bottom is legible

RAC command allows the user to reload all aplications listed at the bottom of this file.

 

Code:

;;; ================================================
;;;        ALTERNATIVE_ACADDOC_v2_02.LSP     
;;;
;;;        Written by Andrzej Kalinowski,     www.autolisps.blogspot.com
;;;        v1.00 - 13.11.2016 - first release
;;;        v2.00 - 22.10.2017
;;;        v2.02 - 01.05.2019 - putting THIS  FILE path into one common place
;;;
;;;        This program is a manager of plugins that the user can load in one file to a startup
;;;        suit in "Load/Unload Applications" dialog window (command APPLOAD).
;;;        It allows not to put double backslashes in paths of applications that this lisp routine loads.
;;;        Adding second backslash (to be understood by Autolisp) each time the user or programmer
;;;        changes a version of a particuler lisp can be iritating, so this program adds it automatically
;;;        while reading this file by autocad. The user has to put double backslashes only in the first
;;;        line of the program (its own location). After loading the user can press F2 to check if all aplications
;;;        loaded succesfully or to check what version of particular application is loaded
;;;        (if the name contains version number).
;;;
;;;        RAC command allows the user to reload all aplications listed at the bottom of this file. 
;;; ================================================

(setenv "ADOC1" "D:\\LISPS\\ALTERNATIVE_ACADDOC_v2_01.LSP");     - HERE YOU PUT THIS FILE PATH WITH DOUBLE BACKSLASHES



;;; ================================================
(vl-load-com)
(defun c:RAC (/ ); Reload AcadDoc
    (textscr)
    (if (load (getenv "ADOC1") nil);THIS FILE
    (princ "\n ALTERNATIVE_ACADDOC ok")(princ "\nALTERNATIVE_ACADDOC failed to load!!!!!!!!!!!!!!!!!!!!!!"));if
    (princ)
);defun
(textscr)
(defun AK_LOAD_LISPS ( / infile1 string1 list1 list2 elem1 appname1 LastElSpaces)
    (setq list2 (list)    infile1 (open (getenv "ADOC1") "r") );THIS FILE
    (while (/= ";LIST_STOP" (setq string1 (read-line infile1) ) )
        (if (not (null string1))
            (setq list1 (append list1 (list string1) ) );makes a list of strings of every line of this file
        ) ; if
    ) ;while
    (close infile1)
    ;-----------------------------------------
    ;finding length of the shift of the path (nr of spaces)
    ;-----------------------------------------
    (setq
        LastElSpaces (nth (- (length list1) 1) list1);reading of the last element on the list (path to the lisp)
        LastElSpaces (vl-list->string (reverse (vl-string->list LastElSpaces)))
        LastElSpaces  (substr LastElSpaces (+ 1 (vl-string-position (ascii " " ) LastElSpaces) )   (strlen LastElSpaces) ) ;substracting only spaces
    );setq
    ;-----------------------------------------
    ;creating a list of application paths 
    ;-----------------------------------------
    (foreach elem1 list1
        (if (= LastElSpaces (substr elem1  1 (strlen LastElSpaces) ) );checks if the line is in the same style like line containing path
            (progn ;wlse
                (setq elem1 (substr elem1  (1+ (strlen LastElSpaces) ) (strlen elem1) ) );removes spaces 
                (setq list2 (cons elem1 list2 ) )
            );progn
        );if
    );foreach
    (setq list2 (reverse list2) );restores reversed alphabetical order
    ;-----------------------------------------
    ;retreiving aplications names and loading files 
    ;-----------------------------------------
    (foreach elem1 list2
        (setq
            appname1 (vl-list->string (reverse (vl-string->list elem1)))
            appname1 (substr appname1 (+ 2 (vl-string-position (ascii ".") appname1) ) (strlen  appname1) )
            appname1 (substr appname1 1 (vl-string-position (ascii "\\") appname1) ) 
            appname1 (vl-list->string (reverse (vl-string->list appname1)))
        );setq
        (if (load elem1 nil)
            (princ (strcat "\n" appname1 ) )
            (princ (strcat "\n" appname1 "          failed to load!!!!!!!!!!!!!!!!!!!!!!"))
        );if
    );foreach
    (princ)
);defun
(terpri) (AK_LOAD_LISPS);here we run application defined above with local variables
(graphscr)
;|
;LIST_START

;3PT_4PT_ANGLE
                                    D:\LISPS\3PT_4PT_ANGLE\3PT_4PT_ANGLE_v2_00.FAS
;ADDSELECTED
                                    D:\LISPS\ADDSELECTED\ADDSELECTED_v1_01.FAS
;ARRANGE 
                                    D:\LISPS\ARRANGE\ARRANGE_V1.FAS
;COPY_ELEVATION_MEP
                                    D:\LISPS\COPY_ELEVATION_MEP\CE_CE2_RDUK_Kotlarska_v4.FAS
;CONNECT_AMEP_DUCT_V6
                                    D:\LISPS\CONNECT_MEP_OBJECTS\CONNECT_AMEP_DUCT_V6.FAS
;CONTINUE_DUCT_PIPE_CABELTR
                                    D:\LISPS\CONTINUE_DUCT_PIPE_CABELTR\CONTINUE_DUCT_PIPE_CABELTR_v2_03.FAS
;COPY_FURTHER
                                    D:\LISPS\COPY_FURTHER\COPY_FURTHER_v7.FAS
;DISPROP
                                    D:\LISPS\DISPROP\DISPROP_v4.FAS
;DUPLICATE_LAYER
                                    D:\LISPS\DUPLICATE_LAYER\DUPLICATE_LAYER_v4.FAS
;DUCT_PIPE_CONNECT_FLEXADD
                                    D:\LISPS\CONNECT_MEP_OBJECTS\DUCT_PIPE_CONNECT_FLEXADD_v2.FAS
;EDITINSECTION
                                    D:\LISPS\EDITINSECTION\EDITINSECTION_v5.FAS
;ANNOTATE_DUCT_PIPE
                                    D:\LISPS\ANNOTATE_DUCT_PIPE\ANNOTATE_DUCT_PIPE_v13.FAS
;FLOC_FPATH_OFLOC_XPATH_XLOC_OXLOC
                                    D:\LISPS\FLOC_FPATH_XPATH\FPATH_FLOC_XPATH_TO_CLIPBOARD_v1_01.FAS
;GLU
                                    D:\LISPS\GLUE_MEP\GLU.FAS
;MATCH_DUCT_PIPE_SYSTEM_v2
                                    D:\LISPS\MATCH_DUCT_PIPE_SYSTEM\MATCH_DUCT_PIPE_SYSTEM_v2a.FAS
;MATCH_INSUL_THICKNESS_AMEP
                                    D:\LISPS\MATCH_INSUL_THICKNESS_AMEP\MATCH_INSUL_THICKNESS_AMEP_v2.FAS
;MATCH_BLOCKS_ROTATION
                                    D:\LISPS\MATCH_BLOCKS_ROTATION\MATCH_BLOCKS_ROTATION_v2.FAS
;MATCH_ELEVATION_MEP
                                    D:\LISPS\MATCH_ELEVATION_MEP\MATCH_ELEVATION_MEP_v2.FAS
;MOVE_COPY_STRETCH_TO_INTERSEC
                                    D:\LISPS\MOVE_COPY_STRETCH_TO_INTERSEC\MOVE_COPY_STRETCH_TO_INTERSEC_v4.FAS
;PAN_VIEW+COPY
                                    D:\LISPS\PAN_VIEW+COPY\PAN_VIEW+COPY_KOTLARSKA_2000020.FAS
;PURGE_ALL
                                    D:\LISPS\PURGE_ALL\PURGE_ALL.FAS
;RECTANGLE_CENTER
                                    D:\LISPS\RECTANGLE_CENTER\RECTANGLE_CENTER2.FAS
;REFEDIT_REFCLOSE
                                    D:\LISPS\REFEDIT_REFCLOSE\REFEDIT_REFCLOSE.FAS
;RELOAD_ACAD_DOC
                                    D:\LISPS\ACADDOC\RELOAD_ACAD_DOC.FAS
;RENAME_BLOCK_LAYER+DCL
                                    D:\LISPS\RENAME_BLOCK_LAYER\RENAME_BLOCK_LAYER+DCL_v2.FAS
;REVCLOUDS
                                    D:\LISPS\REVCLOUDS\REVCLOUDS_v1_01.FAS
;SELECT_LAYER_OBJECTS
                                    D:\LISPS\SELECT_LAYER_OBJECTS\SELECT_LAYER_OBJECTS.FAS
;SLAB_FROM_POLYLINE
                                    D:\LISPS\SLAB_FROM_POLYLINE\SLABFROMPOLYLINE1.FAS
;SUM_AREA
                                    D:\LISPS\SUM_AREA\SUM_AREA_v2_01.FAS
;SWAP_BLOCK_MATCH_BLOCK
                                    D:\LISPS\SWAP_BLOCK_MATCH_BLOCK\SWAP_BLOCK_MATCH_BLOCK+SCALE_v4.FAS
;UNION_POLYLINES
                                    D:\LISPS\UNION_POLYLINES\UNION_POLYLINES_v4.FAS
;QUICKAPPLOAD
                                    D:\LISPS\QUICK_APPLOAD\QUICKAPPLOAD_v1_01.FAS
;QUICKMIRROR
                                    D:\LISPS\QUICK_MIRROR\QUICKMIRROR_v3_00.FAS
;QUICK_ROTATE_90
                                    D:\LISPS\QUICK_ROTATE_90\QUICK_ROTATE_90_v7.FAS
;QUICK_PLAN
                                    D:\LISPS\QUICK_PLAN\QUICK_PLAN_v1.FAS
;QSELECT_TYPE_LAYER
                                    D:\LISPS\QSELECT_TYPE_LAYER_COLOR\QSELECT_TYPE_LAYER_v9_01.FAS
;QUICK_STRETCH_DUCT_LINE
                                    D:\LISPS\QUICK_STRETCH_DUCT_LINE\QUICK_STRETCH_DUCT_LINE_v2_06.FAS
;XREF_RUTINES
                                    D:\LISPS\XREF_RUTINES\XREF_RUTINES_v2.FAS
;LIST_STOP
|;
;;; ================ END OF FILE ============================

Example:
 

 

Download file: ALTERNATIVE_ACADDOC_v2_02.LSP

No comments:

Post a Comment