home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DP Tool Club 24
/
CD_ASCQ_24_0995.iso
/
dos
/
fr
/
side_cad
/
util
/
acad.mnl
next >
Wrap
Text File
|
1995-01-19
|
6KB
|
215 lines
;;; ACAD.MNL
;;; Copyright (C) 1992 by Autodesk, Inc.
;;;
;;; La permission d'utiliser, de copier, de modifier,
;;; de distribuer gratuitement ce logiciel ou tout autre usage est autoris
;;; pourvus que le Copyright apparaisse sur chaque copies et notices.
;;; Ce logiciel est fourni "tel quel" sans garantie tacite.
;;;
;;; THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED
;;; WARRANTY. ALL IMPLIED WARRANTIES OF FITNESS FOR ANY PARTICULAR
;;; PURPOSE AND OF MERCHANTABILITY ARE HEREBY DISCLAIMED.
;;;
;;; Routines AutoLISP utilisees par le Menu Standart AutoCAD 12
(princ "\nAutoCAD Version 12, Utilitaire de menus...")
;;;=== Icon Menu Functions ===
;;; View -> Layout -> Tiled Viewports...
(defun ai_tiledvp_chk ()
(setq m:err *error* *error* *merrmsg*)
(if (= (getvar "TILEMODE") 0)
(progn
(princ "\n** Commande non autorisée à moins que TILEMODE soit à 1 (Actif) **")
(princ)
)
(progn
(menucmd "I=VPORTI")
(menucmd "I=*")
)
)
(setq *error* m:err m:err nil)
(princ)
)
(defun ai_tiledvp (num ori / ai_tiles_g ai_tiles_cmde)
(setq m:err *error* *error* *merrmsg*
ai_tiles_cmde (getvar "CMDECHO")
ai_tiles_g (getvar "GRIDMODE")
)
(setvar "CMDECHO" 0)
(setvar "GRIDMODE" 0)
(cond ((= num 1)
(command "_.VPORTS" "_SI")
(setvar "GRIDMODE" ai_tiles_g)
)
((< num 4)
(command "_.VPORTS" "_SI")
(command "_.VPORTS" num ori)
(setvar "GRIDMODE" ai_tiles_g)
)
((= ori nil)
(command "_.VPORTS" "_SI")
(command "_.VPORTS" num)
(setvar "GRIDMODE" ai_tiles_g)
)
((= ori "L")
(command "_.UNDO" "_M")
(command "_.VPORTS" "_SI")
(command "_.VPORTS" "2" "")
(setvar "CVPORT" (car (cadr (vports))))
(command "_.VPORTS" "2" "")
(command "_.VPORTS" "_J" "" (car (cadr (vports))))
(setvar "CVPORT" (car (cadr (vports))))
(command "_.VPORTS" "3" "_H")
(setvar "GRIDMODE" ai_tiles_g)
(setvar "CVPORT" (car (cadddr (vports))))
(setvar "GRIDMODE" ai_tiles_g)
(setvar "CVPORT" (car (cadddr (vports))))
(setvar "GRIDMODE" ai_tiles_g)
(setvar "CVPORT" (car (cadddr (vports))))
(setvar "GRIDMODE" ai_tiles_g)
(command "_.UNDO" "_E")
)
(T
(command "_.UNDO" "_M")
(command "_.VPORTS" "_SI")
(command "_.VPORTS" "2" "")
(command "_.VPORTS" "2" "")
(setvar "CVPORT" (car (caddr (vports))))
(command "_.VPORTS" "_J" "" (car (caddr (vports))))
(setvar "CVPORT" (car (cadr (vports))))
(command "_.VPORTS" "3" "_H")
(setvar "GRIDMODE" ai_tiles_g)
(setvar "CVPORT" (car (cadddr (vports))))
(setvar "GRIDMODE" ai_tiles_g)
(setvar "CVPORT" (car (cadddr (vports))))
(setvar "GRIDMODE" ai_tiles_g)
(setvar "CVPORT" (car (cadddr (vports))))
(setvar "GRIDMODE" ai_tiles_g)
(command "_.UNDO" "_E")
)
)
(setq *error* m:err m:err nil)
(setvar "CMDECHO" ai_tiles_cmde)
(princ)
)
;;;=== General Utility Functions ===
(defun *merr* (msg)
(setq *error* m:err m:err nil)
(princ)
)
(defun *merrmsg* (msg)
(princ msg)
(setq *error* m:err m:err nil)
(princ)
)
(defun c:rectang ( / cmde pt1 pt2)
(setq m:err *error* *error* *merr*
cmde (getvar "CMDECHO")
)
(setvar "CMDECHO" 0)
(setq pt1 (getpoint "\nPremier coin du rectangle : ")
pt2 (getcorner pt1 "\nDeuxième coin : ")
)
(command "_.PLINE" pt1 (list (car pt1) (cadr pt2))
pt2 (list (car pt2) (cadr pt1))
"_C"
)
(setvar "CMDECHO" cmde)
(setq *error* m:err m:err nil)
(princ)
)
(defun c:ai_peditm (/ m:p0 m:p1)
(setq m:err *error* *error* *merr*)
(defun m:p0 (/ m:s1 m:e1 m:e2 m:e3)
(menucmd"S=X")
(menucmd"S=PSEL")
(while (not m:s1)
(if (setq m:s1 (ssget))
(progn
(setq m:e1 (ssname m:s1 0)
m:e2 (entget m:e1)
m:e3 (cdr (assoc 0 m:e2))
)
(if (= m:e3 "POLYLINE")
(m:p1)
(if (member m:e3 '("LINE" "ARC"))
(progn
(command "_.PEDIT" m:e1 pause)
(menucmd "S=X")
(menucmd "S=P0")
)
(progn
(terpri)
(princ "L'entité sélectionnée n'est pas une Polyligne.")
(terpri)
(setq m:s1 nil)
)
)
)
)
)
)
)
(defun m:p1 (/ m:a)
(menucmd"S=X")
(if (= (setq m:a (cdr (assoc 70 m:e2))) nil)
(menucmd"S=P0")
(progn
(setq m:a (/ m:a 2))
(if (>= m:a 8)
(menucmd"S=P16")
(if (< m:a 4)
(menucmd"S=P0")
(menucmd"S=P8")
)
)
)
)
(command "_.PEDIT" m:e1)
)
(m:p0)
(setq *error* m:err m:err nil)
(princ)
)
;;;=== Menu Functions ===
(defun ai_rootmenus ()
(setq T_MENU 0)
(menucmd "S=X")
(menucmd "S=S")
(menucmd "T2=TABLET2")
(menucmd "T3=TABLET3")
(menucmd "T4=TABLET4")
(princ)
)
(if (not (load "acadr12.lsp" nil))
(progn
(princ "ERREUR de chargement.")
(princ "\nFichier ACADR12.lsp non trouvé. AutoLoader n'est pas chargé. ")
(princ "Autre utilitaire.")
)
(progn
(ai_loadaverendr)
(ai_aloadame)
(ai_asegrey "~")
)
)
(setvar "MENUCTL" 1)
(if (not (load"side_cad.lsp" nil))(alert "Ne trouve pas le fichier SiDE_CAD.LSP")(c:side_cad))
(princ " chargé.")
(princ)