vray manual

Download Vray Manual

If you can't read please download the document

Upload: pomodoro69

Post on 22-Nov-2014

493 views

Category:

Documents


12 download

TRANSCRIPT

e* will be created at load time. ; ;;;--------------------------------------------------------------------; (setq *ModelSpace* (vla-get-ModelSpace (vla-get-ActiveDocument (vlax-get-acad-object)) ) ;_ end of vla-get-ModelSpace ) ;_ end of setq ;;; In lesson 4, the following function is moved to utils.lsp ; ;;;--------------------------------------------------------------------; ;;; Function: Degrees->Radians ; ;;;--------------------------------------------------------------------; ;;; Description: This function converts a number representing an ; ;;; angular measurement in degrees, into its radian ; ;;; equivalent. There is no error checking done on the ; ;;; numberOfDegrees parameter -- it is always expected ; ;;; to be a valid number. ; ;;;--------------------------------------------------------------------; (defun Degrees->Radians (numberOfDegrees) (* pi (/ numberOfDegrees 180.0)) ) ;_ end of defun ;;; In lesson 4, the following function is moved to utils.lsp ; ;;;--------------------------------------------------------------------; ;;; Function: 3dPoint->2dPoint ; ;;;--------------------------------------------------------------------; ;;; Description: This function takes one parameter representing a ; ;;; 3D point (a list of three integers or reals), and ; ;;; converts it into a 2D point (a list of two reals). ; ;;; There is no error checking done on the 3dpt ; ;;; parameter -- it is always expected to be a valid ; ;;; point. ; ;;;--------------------------------------------------------------------; ;;; Work to do: Add some kind of parameter checking so that this ; ;;; function won't crash a program if it is passed a ; ;;; null value, or some other kind of data type than a ; ;;; 3D point. ; ;;;--------------------------------------------------------------------; (defun 3dPoint->2dPoint (3dpt) (list (float (car 3dpt)) (float (cadr 3dpt))) ) ;_ end of defun ;;; In lesson 4, the following function is moved to utils.lsp ; ;;;--------------------------------------------------------------------; ;;; Function: list->variantArray ; ;;;--------------------------------------------------------------------; ;;; Description: This function takes one parameter representing a ; ;;; list of double values, e.g. a list of 2D points: ; ;;; '(p1.X p1.Y p2.X p2.Y p3.X p3.Y p4.X p4.Y). ; ;;; The list is converted into an ActiveX ; ;;; variant based on a safearray. ; ;;; No error checking is performed on the parameter -- ; ;;; it is assumed to consist of a list of doubles. ; ;;;------------------------------------------------------------------- ; (defun gp:list->variantArray (ptsList / arraySpace sArray) ; allocate space for an array of 2d poin ts stored as doubles (setq arraySpace (vlax-make-safearray

)

vlax-vbdouble ; element type (cons 0 (- (length ptsList) 1) ) ; array dimension

)

) (setq sArray (vlax-safearray-fill arraySpace ptsList)) ; return array variant (vlax-make-variant sArray)

;;; In lesson 4, the following function is moved to gp-io.lsp ; ;;;--------------------------------------------------------------------; ;;; Function: gp:getPointInput ; ;;;--------------------------------------------------------------------; ;;; Description: This function will ask the user to select three ; ;;; points in the drawing, which will determine the ; ;;; path location, direction, and size. ; ;;;--------------------------------------------------------------------; ;;; If the user responds to the get functions with valid data, ; ;;; use startPt and endPt to determine the position, length, and ; ;;; angle at which the path is drawn. ; ;;;--------------------------------------------------------------------; ;;; The return value of this function will be a list consisting of: ; ;;; (10 . Starting Point) ;; A list of 3 reals (a point) denotes ; ;;; ;; the starting point of the garden path. ; ;;; (11 . Ending Point) ;; A list of 3 reals (a point) denotes ; ;;; ;; the ending point of the garden path. ; ;;; (40 . Width) ;; A real number denoting boundary width ; ;;; (41 . Length) ;; A real number denoting boundary length ; ;;; (50 . Path Angle) ;; A real number denoting the angle of the ; ;;; ;; path, in radians ; ;;;--------------------------------------------------------------------; (defun gp:getPointInput (/ StartPt EndPt HalfWidth) (if (setq StartPt (getpoint "\nStart point of path: ")) (if (setq EndPt (getpoint StartPt "\nEndpoint of path: ")) (if (setq HalfWidth (getdist EndPt "\nHalf width of path: ")) ;; if you've made it this far, build the association list ;; as documented above. This will be the return value ;; from the function. (list (cons 10 StartPt) (cons 11 EndPt) (cons 40 (* HalfWidth 2.0)) (cons 50 (angle StartPt EndPt)) (cons 41 (distance StartPt EndPt)) ) ;_ end of list ) ;_ end of if ) ;_ end of if ) ;_ end of if ) ;_ end of defun ;;; In lesson 4, the following function is moved to gp-io.lsp ; ;;;--------------------------------------------------------------------; ;;; Function: gp:getDialogInput ; ;;;--------------------------------------------------------------------; ;;; Description: This function will ask the user to determine the ; ;;; following path parameters: ;

;;; Tile size, Tile spacing ; ;;; Boundary polyline type ; ;;; Entity creation method ; ;;;--------------------------------------------------------------------; (defun gp:getDialogInput () (alert "Function gp:getDialogInput will get user choices via a dialog" ) ;_ end of alert ;; For now, return T, as if every task in the function worked correctly T ) ;_ end of defun

;;; In lesson 4, the following function is moved to gpdraw.lsp ; ;;;--------------------------------------------------------------------; ;;; Function: gp:drawOutline ; ;;;--------------------------------------------------------------------; ;;; Description: This function will draw the outline of the garden ; ;;; path. ; ;;;--------------------------------------------------------------------; ;;; Note: no error checking or validation is performed on the ; ;;; BoundaryData parameter. The sequence of items within this ; ;;; parameter do not matter, but it is assumed that all sublists ; ;;; are present, and contain valid data. ; ;;;--------------------------------------------------------------------; ;;; Note: This function uses Activex as a means to produce the garden ; ;;; path boundary. The reason for this will become apparent during ; ;;; future lessons. But here is a hint: certain entity creation ; ;;; methods will not work from within a reactor-triggered function ; ;;;--------------------------------------------------------------------; (defun gp:drawOutline (BoundaryData / VLADataPts PathAngle Width HalfWidth StartPt PathLength angm90 angp90 p1 p2 p3 p4 polypoints pline ) ;; extract the values from the list BoundaryData (setq PathAngle (cdr (assoc 50 BoundaryData)) Width (cdr (assoc 40 BoundaryData)) HalfWidth (/ Width 2.00) StartPt (cdr (assoc 10 BoundaryData)) PathLength (cdr (assoc 41 BoundaryData)) angp90 (+ PathAngle (Degrees->Radians 90)) angm90 (- PathAngle (Degrees->Radians 90)) p1 (polar StartPt angm90 HalfWidth) p2 (polar p1 PathAngle PathLength) p3 (polar p2 angp90 Width) p4 (polar p3 (+ PathAngle (Degrees->Radians 180)) PathLength) polypoints (apply 'append (mapcar '3dPoint->2dPoint (list p1 p2 p3 p4)) ) ) ;; ***** data conversion ***** ;; Notice, polypoints is in AutoLISP format, consisting of a list of the ;; 4 corner points for the garden path. ;; The variable needs to be converted to a form of input parameter ;; acceptable to ActiveX calls. (setq VLADataPts (gp:list->variantArray polypoints))

;; Add polyline to the model space using ActiveX automation. (setq pline (vla-addLightweightPolyline *ModelSpace* ; Global Definition for Model Space VLADataPts ) ;_ end of vla-addLightweightPolyline ) ;_ end of setq (vla-put-closed pline T) ;; Return the ActiveX object name for the outline polyline ;; The return value should look something like this: ;; # pline ) ;_ end of defun ;;;********************************************************************; ;;; Function: C:GPath The Main Garden Path Function ; ;;;--------------------------------------------------------------------; ;;; Description: This is the main garden path function. It is a C: ; ;;; function, meaning that it is turned into an AutoCAD ; ;;; command called GPATH. This function determines the ; ;;; overall flow of the Garden Path program ; ;;;********************************************************************; ;;; The gp_PathData variable is an association list of the form: ; ;;; (10 . Starting Point) -- A list of 3 reals (a point) denotes ; ;;; the starting point of the garden path ; ;;; (11 . Ending Point) -- A list of 3 reals (a point) denotes ; ;;; the ending point of the garden path ; ;;; (40 . Width) -- A real number denoting boundary width ; ;;; (41 . Length) -- A real number denoting boundary length ; ;;; (50 . Path Angle) -- A real number denoting the angle of the ; ;;; path, in radians ; ;;; (42 . Tile Size) -- A real number denoting the size ; ;;; (radius) of the garden path tiles ; ;;; (43 . Tile Offset) -- Spacing of tiles, border to border ; ;;; ( 3 . Object Creation Style) ; ;;; -- The object creation style indicates how ; ;;; the tiles are to be drawn. The ; ;;; expected value is a string and one ; ;;; one of three values (string case is : ;;; unimportant): ; ;;; "ActiveX" ; ;;; "Entmake" ; ;;; "Command" ; ;;; ( 4 . Polyline Border Style) ; ;;; -- The polyline border style determines ; ;;; the polyline type to be used for the ; ;;; path boundary. The expected value ; ;;; one of two values (string case is : ;;; unimportant): ; ;;; "Pline" ; ;;; "Light" ; ;;;********************************************************************; (defun C:GPath (/ gp_PathData PolylineName) ;; Ask the user for input: first for path location and ;; direction, then for path parameters. Continue only if you have ;; valid input. Store the data in gp_PathData (if (setq gp_PathData (gp:getPointInput)) (if (gp:getDialogInput)

(progn ;; At this point, you have valid input from the user. ;; Draw the outline, storing the resulting polyline "pointer" ;; in the variable called PolylineName (setq PolylineName (gp:drawOutline gp_PathData)) (princ "\nThe gp:drawOutline function returned ") (Alert "Congratulations - your program is complete!") ) ;_ end of progn (princ "\nFunction cancelled.") ) ;_ end of if (princ "\nIncomplete information to draw a boundary.") ) ;_ end of if (princ) ; exit quietly ) ;_ end of defun ;;; Display a message to let the user know the command name (princ "\nType GPATH to draw a garden path.") (princ) & Qq4j 9 $FZUnW 8#8w 8_QQj@&A)/g>'K t;\ V )g B0i (4T %) 0C& Z i 8bx EB ; P Aom?W= x- [ 0}y)7ta>jT7 @t `q2 A9=-t l`;~p - 25 S>V d`rn~Y&+` ; A4 &6Z L ?_yxg)

YA +Cb( R,* T 2B- nQt}MA 0al Sx

k&^>0 >_ ' ,G!"F$H:R

!zF Qd?r

9 \A& G

rQ

}E ]a4z Bg EH h } Cq9 # N')].uJr

*B= 0HI p p 0MxJ$D1

D, V KY dE"E I2 EB

w G xR^ [o ch g`>b $*~ : E b ~ ,m,- ,Y*6X [F=3 n3kGz= [= = %A'\ u SL&

~8 x, 5-"6b

q k[ v65 N #lEM ! f 0$~0 w x y a9 g

fe Hl5ht 4 M X =d -" =X:/3;4M Ro=@ )5f* ] E-vhReBh#} suBe)4 &-5YH-+IX R, L ch ! > e Uu 137s s S6 ;;; ;;; GPREACT.LSP ;;; ;;; Copyright 1987, 1988, 1990, 1992, 1994, 1996, 1997, 1998 ;;; by Autodesk, Inc. All Rights Reserved. ;;; ;;; You are hereby granted permission to use, copy and modify this ;;; software without charge, provided you do so exclusively for ;;; your own use or for use by others in your organization in the ;;; performance of their normal duties, and provided further that ;;; the above copyright notice appears in all copies and both that ;;; copyright notice and the limited warranty and restricted rights ;;; notice below appear in all supporting documentation. ;;; ;;; Incorporation of any part of this software into other software, ;;; except when such incorporation is exclusively for your own use ;;; or for use by others in your organization in the performance of ;;; their normal duties, is prohibited without the prior written ;;; consent of Autodesk, Inc. ;;; ;;; Copying, modification and distribution of this software or any ;;; part thereof in any form except as expressly provided herein is ;;; prohibited without the prior written consent of Autodesk, Inc. ;;; ;;; AUTODESK PROVIDES THIS SOFTWARE "AS IS" AND WITH ALL FAULTS. ;;; AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF ;;; MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, ;;; INC. DOES NOT WARRANT THAT THE OPERATION OF THE SOFTWARE ;;; WILL BE UNINTERRUPTED OR ERROR FREE. ;;; ;;; Restricted Rights for US Government Users. This software ;;; and Documentation are provided with RESTRICTED RIGHTS for US ;;; US Government users. Use, duplication, or disclosure by the ;;; Government is subject to restrictions as set forth in FAR ;;; 12.212 (Commercial Computer Software-Restricted Rights) and ;;; DFAR 227.7202 (Rights in Technical Data and Computer Software), ;;; as applicable. Manufacturer is Autodesk, Inc., 111 McInnis ;;; Parkway, San Rafael, California 94903. ;;;

; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ;

;;;--------------------------------------------------------------------; ;;; This file is from the Garden Path tutorial, and represents the ; ;;; final state of the application at the end of Lesson 7. Use this ; ;;; file to check your work. ; ;;;--------------------------------------------------------------------; ;;;--------------------------------------------------------------------; ;;; General Notes: ; ;;;--------------------------------------------------------------------; ;;; After the execution of these reactor functions, you might ; ;;; experience difficulty in returning to Visual Lisp. If this does ; ;;; happen, type VLide at the AutoCAD command prompt and focus will ; ;;; be returned to Visual Lisp. ; ;;;--------------------------------------------------------------------; ;;; There are three types of reactors which we will be using: ; ;;; 1. an object reactor ; ;;; 2. a command reactor ;

;;; 3. a drawing reactor ; ;;; We will define two functions that will notify us when the user ; ;;; has modified or changed the garden path. ; ;;;--------------------------------------------------------------------; ;;; Object Reactor ; ;;;---------------------- --------------------- -----------------------; ;;; Event Function to call Description ; ;;;---------------------- --------------------- -----------------------; ;;; :vlr-modified gp:outline-changed Function called ; ;;; when object declared ; ;;; in owners is modified ; ;;;---------------------- --------------------- -----------------------; ;;; :vlr-erased gp:outline-erased Function called ; ;;; when object is erased ; ;;;---------------------- --------------------- -----------------------; ;;; ; ;;; Command Reactor ; ;;;---------------------- --------------------- -----------------------; ;;; Event Function to call Description ; ;;;---------------------- --------------------- -----------------------; ;;; :vlr-commandWillStart gp:command-will-start Function called when ; ;;; a command is typed ; ;;; at the command prompt ; ;;;---------------------- --------------------- -----------------------; ;;; :vlr-commandEnded gp:command-ended Function called when ; ;;; a command has ended ; ;;;---------------------- --------------------- -----------------------; ;;; ; ;;; Drawing Reactor ; ;;;---------------------- --------------------- -----------------------; ;;; Event Function to call Description ; ;;;---------------------- --------------------- -----------------------; ;;; :vlr-beginClose gp:clean-all-reactors Function to clean all ; ;;; existing reactors ; ;;; before ACAD exits ; ;;;--------------------------------------------------------------------; ;;; Since reactor events occur in sequence (commandWillStart occuring ; ;;; before the object modified reactor, for example), we need a few ; ;;; global variables to keep track of what changes are occuring to the ; ;;; path. The following globals are used: ; ;;; *lostAssociativity* ; ;;; *polyToChange* ; ;;; *reactorsToRemove* ; ;;; *reactorToChange* ; ;;; *Safe-to-Delete* ; ;;;--------------------------------------------------------------------; ;;;--------------------------------------------------------------------; ;;; Function: Gp:Safe-Delete ; ;;;--------------------------------------------------------------------; ;;; Description: This function is used to clean-up (erase) any objects; ;;; that have not been erased in a previous command/ ; ;;; reactor sequence. This function is called only from ; ;;; the :vlr-commandEnded reactor event callback function; ;;; gp:Command-ended. Items (tiles) to delete are ; ;;; collected within the global variable *Safe-to-Delete*; ;;;--------------------------------------------------------------------; ;;; The parameter activeCommand is the name of the command that has ; ;;; just ended. Because of the command/reactor sequence within any of;

;;; the GRIP_* commands, entity may only be done if the command is NOT; ;;; a GRIP_* command. ; ;;;--------------------------------------------------------------------; (defun Gp:Safe-Delete (activeCommand / owner trl) (if (not (equal (strcase (substr activeCommand 1 5)) "GRIP_" ) ) (progn (if *Safe-to-Delete* (foreach Item *Safe-to-Delete* (if (not (vlax-erased-p Item)) (vla-erase item) ) ) ) (setq *Safe-to-Delete* nil) (setq trl (assoc :VLR-OBJECT-REACTOR (vlr-reactors))) (if trl (setq trl (cdr trl))) (while trl (progn (foreach owner *OwnerReactorsToRemove* (if owner (vlr-owner-remove (car trl) owner) ) ) (setq trl (cdr trl)) ) ) ) )

)

;;;--------------------------------------------------------------------; ;;; Function: gp:erase-tiles ; ;;;--------------------------------------------------------------------; ;;; Description: A utility function for erasing all of the tiles in a ; ;;; garden path. ; ;;;--------------------------------------------------------------------; ;;; The parameter "reactor" passed to this function is a pointer to a ; ;;; reactor associated with a garden path. This reactor should have ; ;;; reactor data stored within it which contains VLA-object ID's for ; ;;; each of the tiles (circles) within the path. By retrieving this ; ;;; data, the tiles can be erased. ; ;;; After erasing the tiles, a nil value is put back into the reactor ; ;;; data (otherwise, the reactor would have bad pointers to tiles that; ;;; have just been erased.) ; ;;;--------------------------------------------------------------------; (defun gp:erase-tiles (reactor / reactorData tiles tile) (if (setq reactorData (vlr-data reactor)) (progn ;; Tiles in the path are stored as data in the reactor (setq tiles (cdr (assoc 100 reactorData))) ;; Erase all the existing tiles in the path

)

)

(foreach tile tiles (if (and (null (member tile *Safe-to-Delete*)) (not (vlax-erased-p tile)) ) (progn (vla-put-visible tile 0) (setq *Safe-to-Delete* (cons tile *Safe-to-Delete*)) ) ) ) (vlr-data-set reactor nil) )

;;;--------------------------------------------------------------------; ;;; Function: gp:command-will-start ; ;;;--------------------------------------------------------------------; ;;; Description: This is a reactor to any command starting ; ;;;--------------------------------------------------------------------; ;;; This is the function where we figure out what will be happening ; ;;; to the garden path. The various reactor globals are set to ; ;;; flag the changes that we expect to be made, so that subsequent ; ;;; reactor events will perform the correct actions. ; ;;;--------------------------------------------------------------------; (defun gp:command-will-start (reactor command-list) ;; Reset all four reactor globals to nil (setq *lostAssociativity* nil *polyToChange* nil *reactorsToRemove* nil *reactorsToChange* nil ) (if (member (setq currentCommandName (car command-list)) '("U" "UNDO" "STRETCH" "MOVE" "ROTATE" "SCALE" "BREAK" "GRIP_MOVE" "GRIP_ROTATE" "GRIP_SCALE" "GRIP_MIRROR" ) ) (progn (setq *lostAssociativity* T) (princ "\nNOTE: The ") (princ currentCommandName) (princ " command will break a path's associativity.") ) ) (princ) )

;;;--------------------------------------------------------------------; ;;; Function: gp:outline-erased ; ;;;--------------------------------------------------------------------; ;;; Description: This reactor function is triggered if the path ; ;;; outline is being erased. In this case, store the ;

;;; reactor to the global list *reactorsToRemove* ; ;;;--------------------------------------------------------------------; (defun gp:outline-erased (outlinePoly reactor parameterList) (setq *reactorsToRemove* (cons reactor *reactorsToRemove*) *OwnerReactorsToRemove* (cons outlinePoly *OwnerReactorsToRemove*) ) )

;;;--------------------------------------------------------------------; ;;; Function: gp:outline-changed ; ;;;--------------------------------------------------------------------; ;;; Description: This reactor function is fired if the path outline ; ;;; is changed, or if the path is being moved, rotated, ; ;;; or altered in some way (other than being erased). ; ;;; If the command is a grip stretch, the path will ; ;;; retain its associativity with the tiles, so the ; ;;; function must act differently in this situation, ; ;;; by saving a pointer to the polyline border, so that ; ;;; it can be updated during the commandEnded callback. ; ;;;--------------------------------------------------------------------; (defun gp:outline-changed (outlinePoly reactor parameterList) (if *lostAssociativity* (setq *reactorsToRemove* (cons reactor *reactorsToRemove*) ) (setq *polytochange* outlinePoly *reactorsToChange* (cons reactor *reactorsToChange*) ) ) )

;;;--------------------------------------------------------------------; ;;; Function: gp:command-ended ; ;;;--------------------------------------------------------------------; ;;; Description: This reactor function is called at the end of any ; ;;; command. ; ;;;--------------------------------------------------------------------; ;;; This is where the majority of work is done. Once the command ; ;;; that the user is performing has ended, we can get to work. (We ; ;;; cannot modify entities while they are being modified by AutoCAD ; ;;; itself, so we have to wait until we get a notification that the ; ;;; command in progress is complete, and we can have access to the ; ;;; entities.) ; ;;;--------------------------------------------------------------------; (defun gp:command-ended (reactor command-list / objReactor reactorToChange reactorData coordinateValues currentPoints newReactorData newPts tileList ) (cond ;; CONDITION 1 - POLYLINE ERASED (Erase command)

;; If one or more polyline borders are being erased (indicated ;; by the presence of *reactorsToRemove*), erase the tiles within ;; the border, then remove the reactor. (*reactorsToRemove* (foreach objReactor *reactorsToRemove* (gp:erase-tiles objReactor) ) (setq *reactorsToRemove* nil) ) ;; CONDITION 2 - LOST ASSOCIATIVITY (Move, Rotate, etc.) ;; If the associatvity has been lost (undo, move, etc.) then erase ;; the tiles within each border ;; ((and *lostassociativity* *reactorsToChange*) (foreach reactorToChange *reactorsToChange* (gp:erase-tiles reactorToChange) ) (setq *reactorsToChange* nil) ) ;; CONDITION 3 - GRIP_STRETCH ;; In this case, we are keeping the associativity of the tiles to ;; the path, but the path and the tiles will need to be recalculated ;; and redrawn. A GRIP_STRETCH can only be performed on a single ;; POLYLINE at a time. ((and (not *lostassociativity*) *polytochange* *reactorsToChange* (member "GRIP_STRETCH" command-list) ;; for a GRIP_STRETCH, there will be only one reactor in ;; the global *reactorsToChange* (setq reactorData (vlr-data (setq reactorToChange (car *reactorsToChange*) ) ) ) ) ;; First, erase the tiles within the polyline border (gp:erase-tiles reactorToChange) ;; Next, get the current coordinate values of the polyline ;; vertices (setq coordinateValues (vlax-safearray->list (vlax-variant-value (vla-get-coordinates *polyToChange*) ) ) ) ;; ;; ;; ;; ;; ;; If the outline is a lightweight polyline, you'll have 2d points, so use the utility function xyList->ListOfPoints to convert the list of coordinate data into lists of ((x y) (x y) ...) points. Otherwise, use the xyzList->ListOfPoints function that deals with 3d points, and converts the coordinate data into lists of ((x y z) (x y z) ... ) points.

(setq CurrentPoints (if (= (vla-get-ObjectName *polytochange*) "AcDbPolyline") (xyList->ListOfPoints coordinateValues) (xyzList->ListOfPoints coordinateValues) ) ) ;; Send this new information to RedefinePolyBorder -- this will ;; return the new Polyline Border (setq NewReactorData (gp:RedefinePolyBorder CurrentPoints reactorData) ) ;; Get all the border Points and ... (setq newpts (list (cdr (assoc 12 NewReactorData)) (cdr (assoc 13 NewReactorData)) (cdr (assoc 14 NewReactorData)) (cdr (assoc 15 NewReactorData)) ) ) ;; ...update the outline of the polyline with the new points ;; calculated above. If you're dealing with a lightweight polyline, ;; convert these points to 2d (since all of the points in newpts are ;; 3D) otherwise leave them alone. (if (= (cdr (assoc 4 NewReactorData)) "LIGHT") (setq newpts (mapcar '(lambda (point) (3dPoint->2dPoint Point) ) newpts ) ) ) ;; Now update the polyline with the correct points (vla-put-coordinates *polytochange* ;; For description of the list->variantArray see utils.lsp (gp:list->variantArray (apply 'append newpts)) ) ;; We now use the current definition of the NewReactorData which is ;; really the same as the Garden path data structure. The only ;; exception is that the field (100) containing the list of ;; tiles is nil. This is ok since gp:Calculate-and-Draw-Tiles ;; does not require this field to draw the tiles. In fact this ;; function creates the tiles and returns a list of drawn tiles. (setq tileList (gp:Calculate-and-Draw-Tiles ;; path data list without correct tile list NewReactorData ;; Object creation function ;; Within a reactor this *MUST* be ActiveX "ActiveX" ) ) ;; Now that we have received all the tiles drawn we'll rebuild

;; the data structure with the correct tileList value and reset ;; the data property in the reactor ;; Update the tiles associated with the polyline border (setq NewReactorData (subst (cons 100 tileList) (assoc 100 NewReactorData) NewReactorData ) ) ;; By now we have the new data associated with the polyline. ;; All there is left to do is associate it with the reactor ;; using vlr-data-set (vlr-data-set (car *reactorsToChange*) NewReactorData) ;; remove all references to the temporary ;; variables *polytochange* and *reactorsToChange* (setq *polytochange* nil *reactorsToChange* nil ) )

) ;; safely delete any items in the *Safe-to-Delete* global if you can!!! (Gp:Safe-Delete (car command-list)) (setq *OwnerReactorsToRemove* nil) (princ) )

;;;--------------------------------------------------------------------; ;;; Function: gp:clean-all-reactors ; ;;;--------------------------------------------------------------------; ;;; Description: Used to clean all reactors before exiting AutoCAD. ; ;;; This is a Very Important Function! ; ;;;--------------------------------------------------------------------; (defun gp:clean-all-reactors (reactor command-list) (terpri) (princ (list 'gp:clean-all-reactors reactor command-list)) (terpri) (princ (setq reactorData (vlr-data reactor))) (terpri) (princ (list command-list " has been issued")) (cleanReactors) ) - W yQZDQ> %q zlJ:ncnL

y} >ap9,KHk4 Vliw& 7l

]h U\ySE8C G

t MkA V g3n F z\!N {

w?mNk$ ?v *7vm5A& :6;cm v~k ?_On`\x-! :!7@ N=W^ _ z~['l ny lD[ K%

p Cv*+ X@1k g &L Q ?3g uu ]2 gps\ OK=W(^ xci/bEwF6K= . E`S` w."VPb7nMVPr }5 M{hjpS' [io H6rE,_ % ( > E6tR9'

%os m

^ ^BtqY 7V@: }6 -6 /5 H&

ncwx8u

$nyG GD+VT O H

, C$ V 4 lY / 6 UyE s 6 `[ @lk dq jT77*D2w ;;; GRAFUN.LSP ; ;;; ; ;;; Copyright 1987, 1988, 1990, 1992, 1994, 1996, 1997, 1998, 1999 ; ;;; by Autodesk, Inc. All Rights Reserved. ; ;;; ; ;;; You are hereby granted permission to use, copy and modify this ; ;;; software without charge, provided you do so exclusively for ; ;;; your own use or for use by others in your organization in the ; ;;; performance of their normal duties, and provided further that ; ;;; the above copyright notice appears in all copies and both that ; ;;; copyright notice and the limited warranty and restricted rights ; ;;; notice below appear in all supporting documentation. ; ;;; ; ;;; Incorporation of any part of this software into other software, ; ;;; except when such incorporation is exclusively for your own use ; ;;; or for use by others in your organization in the performance of ; ;;; their normal duties, is prohibited without the prior written ; ;;; consent of Autodesk, Inc. ; ;;; ; ;;; Copying, modification and distribution of this software or any ; ;;; part thereof in any form except as expressly provided herein is ; ;;; prohibited without the prior written consent of Autodesk, Inc. ; ;;; ; ;;; AUTODESK PROVIDES THIS SOFTWARE "AS IS" AND WITH ALL FAULTS. ; ;;; AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF ; ;;; MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, ; ;;; INC. DOES NOT WARRANT THAT THE OPERATION OF THE SOFTWARE ; ;;; WILL BE UNINTERRUPTED OR ERROR FREE. ; ;;; ; ;;; Restricted Rights for US Government Users. This software ; ;;; and Documentation are provided with RESTRICTED RIGHTS for US ; ;;; US Government users. Use, duplication, or disclosure by the ; ;;; Government is subject to restrictions as set forth in FAR ; ;;; 12.212 (Commercial Computer Software-Restricted Rights) and ; ;;; DFAR 227.7202 (Rights in Technical Data and Computer Software), ; ;;; as applicable. Manufacturer is Autodesk, Inc., 111 McInnis ; ;;; Parkway, San Rafael, California 94903. ; ;;; ; ;;;--------------------------------------------------------------------; ;;; This file demonstrates adding a 3D mesh utilizing activeX methods ; ;;; and native AutoLISP command function. The Mesh is produced by ; ;;; applying a function to the beginning coordinate for the mesh, ; ;;; a length in Y direction for the mesh, and a length in the x ; ;;; for the mesh. ; ;;; coordinate. ; ;;;--------------------------------------------------------------------; ;;;--------------------------------------------------------------------; ;;; General Note: ACAD user timer must be ON ; ;;; (command "_.time" "_ON" "") ; ;;;--------------------------------------------------------------------; ;;; Load the AutoCAD 2000 COM object model functions here (vl-load-com) ;;;--------------------------------------------------------------------; ;;; Function: GET-UTIME ; ;;; ; ;;; Description: GET-UTIME converts a fraction of a day into ;

;;; seconds by multiplying the result from ; ;;; (getvar "tdusrtimer") and 86400.0. ; ;;; ; ;;; Example: ; ;;; (getvar "tdusrtimer") returns a fraction of ; ;;; one day. So... (getvar "tdusrtimer") might ; ;;; return: 0.138439 ; ;;; In order to return elapsed second we determine ; ;;; Seconds in One Hour: ; ;;; (* 60.00 60.00) = 3600.0 ; ;;; And seconds in One 24 Hour period: ; ;;; (* 24 3600.0) = 86400.0 ; ;;; ; ;;; Arguments: None ; ;;; ; ;;; Returned Value: Returns a real number whose meaning is: ; ;;; Elapsed time in seconds from when the drawing was ; ;;; opened. ; ;;; ; ;;; Usage: (get-utime) ; ;;; ; ;;;--------------------------------------------------------------------; ;;; returns the user time (defun get-utime () (* 86400 (getvar "tdusrtimer")) ) ;;;--------------------------------------------------------------------; ;;; Function: AL-GRAFUN ; ;;; ; ;;; Description: Draws a mesh utilizing the AutoLISP Command ; ;;; function according to the arguments supplied. ; ;;; This function prints elapsed time in minutes ; ;;; and seconds during processes and returns a list ; ;;; points which were used to create the 3D mesh. ; ;;; ; ;;; Required Functions: ; ;;; get-utime ; ;;; ; ;;; Arguments: ; ;;; Fun = Function to apply. ; ;;; xy0 = Lower left corner of rectangular mesh. ; ;;; xy1 = Upper right corner of rectangular mesh. ; ;;; dx = Density factor for x direction. ; ;;; The smaller the number denser the mesh. ; ;;; dy = Density factor for y direction. ; ;;; The smaller the number denser the mesh. ; ;;; ; ;;; Returned Value: A list points which were used to create ; ;;; the 3D mesh. ; ;;; ; ;;;Dislayed Values: Displays time of evaluation in the ; ;;; following format: ; ;;; (TT == NCT + DMT) ; ;;; Where: ; ;;; TT = Total elapsed time. ; ;;; NCT = Elapsed time from start of function which ; ;;; draws the mesh until the function has ; ;;; finished its number crunching. ; ;;; DMT = Elapsed time of the mesh drawing portion ; ;;; after number crunching has finished. ;

;;; ; ;;; Usage: (al-grafun fun xy0 xy1 dx dy) ; ;;;--------------------------------------------------------------------; (defun aal-grafun (fun xy0 xy1 dx dy / x0 y0 x1 y1 x_coord y_coord z_coord cx cy pts ids t0 t1 t2 t3 ce bm os ) (setq t0 (get-utime)) (setq x0 (car xy0) y0 (cadr xy0) x1 (car xy1) y1 (cadr xy1) ) (setq x_coord x0 cx 0) (while (= j k) (setq e2 (subst (cons 91 (+ k 1)) (assoc 91 e2) e2) e1 (append e2 loop e3) );setq then actually adding another loop (progn (setq n 0) (repeat k (if (= n j) (setq e2 (append e2 loop));setq then (setq e2 (append e2 (acet-hatch-loop-data-at-index e1 n)));setq else );if (setq n (+ n 1));setq );repeat (setq e1 (append e2 e3));setq );progn then );if e1 );defun acet-hatch-loop-data-put ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;; ;Takes a selection set for one loop and creates a temporary hatch object and the n ;extracts the loop data at index 0 and returns it. (defun acet-hatch-loop-data-generate ( ss / xt d sf na e1 loop n ) ;; Find the smallest object in the selection set and base that hatch scale off of that (setq n 0) (repeat (sslength ss) (setq na (ssname ss n)) (if (and (setq xt (acet-ent-geomextents na)) (setq xt (distance (car xt) (cadr xt))) (> xt 0.0) (or (not d) (< xt d) );or );and (setq d xt) );if (setq n (+ n 1));setq );repeat (if (and (setq xt (acet-geom-ss-extents ss nil)) (setq xt (distance (car xt) (cadr xt))) d (< d (* 0.02 xt)) );and (setq d (/ (+ d xt) 2.0) );setq then d is way less that the extents of the full selection set so ave rgage the two. );if (if d (progn (setq sf (/ (* 0.75 d) 0.125) na (entlast) );setq

e2 e2 e3 k

(member (assoc 91 e2) e2) (reverse e2) (member (assoc 75 e1) e1) (cdr (assoc 91 e1))

;; portion before path data ;; portion after path data

);if (if (not (equal na (entlast))) (progn (setq na (entlast) e1 (entget na) );setq (command "_.undo" "1") (setq loop (acet-hatch-loop-data-at-index e1 0)) (if (/= (sslength ss) (cdr (assoc 97 loop))) (progn (setq loop (subst (cons 97 (sslength ss)) (assoc 97 loop) loop)) (setq n 0) (repeat (sslength ss) (setq na (ssname ss n) na (cons 330 na) );setq (if (not (member na loop)) (setq loop (append loop (list na)));setq then );if (setq n (+ n 1));setq );repeat );progn then );if );progn then );if loop );defun acet-hatch-loop-data-generate ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;; ;Takes a hatch elist, an ename, and a loop index and ;adds the ename to the hatch boundary path at the specified loop index. ;Returns the new elist. ; (defun acet-hatch-edge-id-add ( e1 na2 j / e2 e3 e4 e5 n a b lst k tp ) (setq e2 (acet-list-split e1 (assoc 92 e1)) e3 (cadr e2) ;; path data and beyond e2 (car e2) ;; prior to path data e3 (acet-list-split e3 (assoc 75 e3)) e4 (cadr e3) ;; after path data e3 (car e3) ;; path data ;e2 (reverse (member (assoc 91 e1) (reverse e1))) ;; the b egining ;e3 (cdr (member (assoc 91 e1) e1)) ;; the path data ;e3 (reverse e3) ;e3 (cdr (member (assoc 75 e3) e3)) ;e3 (reverse e3) ;e4 (member (assoc 75 e1) e1) ;; the end tp (cdr (assoc 0 (entget na2))) );setq (setq n -1) (while e3 (setq a (car e3)) (if (= 92 (car a)) (progn (setq a (cdr a)) (if (and (or (= tp "ELLIPSE") ;; if new object is a ellipse or spline

(command "_.-bhatch" "_prop" "ansi37" sf 0.0 "_select" ss "" "") );progn then

and the loop was a pline (= tp "SPLINE") );or (= 2 (logand 2 a)) );and (setq a (- a 2));setq then remove the pline bit );if (setq e5 (cons (cons 92 a) e5) e3 (cdr e3) );setq (setq n (+ n 1)) (if (= n j) (progn (while (/= (car (car e3)) 97) ;; traverse the data until sourc e object count is found (setq e5 (cons (car e3) e5) e3 (cdr e3) );setq );while (setq a (car e3) e3 (cdr e3) e5 (cons (cons 97 (+ 1 (cdr a))) ;; update source object count e5 ) );setq (while (= (car (car e3)) 330) ;; add in existing source object references (setq e5 (cons (car e3) e5) e3 (cdr e3) );setq );while (setq e5 (cons (cons 330 na2) e5));setq ;; add the one we need t o add );progn then );if );progn then starting a new loop (setq e5 (cons a e5) e3 (cdr e3) );setq else );if );while (setq e5 (reverse e5)) (append e2 e5 e4) );defun acet-hatch-edge-id-add ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;; ;Takes a hatch elist, an ename, and a loop index and ;removes the ename from the hatch boundary path at the specified loop index. ;Returns the new elist. ; (defun acet-hatch-edge-id-remove ( e1 na2 j / e2 e3 e4 e5 n a b lst k tp groupc ) (setq e2 (acet-list-split e1 (assoc 92 e1)) e3 (cadr e2) ;; e2 (car e2) ;; before path data e3 (acet-list-split e3 (assoc 75 e3))

e4 (cadr e3) e3 (car e3) egining

;; after path data ;; path data ;; the b ;; the path data

;e2 (reverse (member (assoc 91 e1) (reverse e1))) ;e3 (cdr (member (assoc 91 e1) e1)) ;e3 (reverse e3) ;e3 (cdr (member (assoc 75 e3) e3)) ;e3 (reverse e3) ;e4 (member (assoc 75 e1) e1) tp (cdr (assoc 0 (entget na2))) groupc (cons 330 na2)

;; the end

);setq (setq n -1) (while e3 (setq a (car e3)) (if (= 92 (car a)) (progn (setq e5 (cons a e5) e3 (cdr e3) );setq (setq n (+ n 1)) (if (= n j) (progn (while (/= (car (car e3)) 97) e object count is found (setq e5 (cons (car e3) e5) e3 (cdr e3) );setq );while (setq a (car e3) e3 (cdr e3) e5 (cons (cons 97 (- (cdr a) count e5 ) );setq (while (= (car (car e3)) 330) references (if (not (equal (car e3) groupc)) (setq e5 (cons (car e3) e5)) ing so add it );if (setq e3 (cdr e3));setq );while );progn then );if );progn then starting a new loop (setq e5 (cons a e5) e3 (cdr e3) );setq else );if );while (setq e5 (reverse e5)) (append e2 e5 e4) );defun acet-hatch-edge-id-remove

;; traverse the data until sourc

1))

;; update source object

;; add in existing source object ;; then not the one we are remov

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;

;Takes a hatch elist and removes references to boundary source objects from the list. ;Returns the new list. ; (defun acet-hatch-edge-id-remove-all ( e1 / x e2 pflag ) (foreach x e1 (cond ((= (car x) 97) (setq x '(97 . 0) pflag T ;; into the path data now ) ) ((and pflag (= (car x) 330) );and (setq x nil) ) );cond close (if x (setq e2 (cons x e2)) );if );foreach (reverse e2) );defun acet-hatch-edge-id-remove-all ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;; ;Takes a hatch elist, an old ename and a new ename and replaces references ;to the old object with references to the new one. ;Returns a list of three items: ; (elist oldna newna) ; ;elist - the updated version of the hatch elist ;oldna - the newly created version of oldna (the original is deleted) ;newna - the newly created version of newna (the original is deleted) ; ;NOTE: The newna and oldna objects are re-created in order to add/remove the rea ctors. ; Also note that the hatch is not modified via entmod. Only its list is mod ified. ; (defun acet-hatch-edge-id-replace-db ( e1 oldna newna / na lst e2 ) (if (equal (type e1) 'ENAME) (setq na e1 e1 (entget na) );setq then (setq na (cdr (assoc -1 e1)));setq else );if (if (and (setq e2 (entget newna)) (setq e2 (acet-acadreactor-id-add e2 na)) ;; point at the hatch (entmake e2) );and (progn (entdel newna) (setq newna (entlast) e1 (subst (cons 330 newna) (cons 330 oldna) e1) e2 (entget oldna) e2 (acet-acadreactor-id-remove e2 na) );setq (entmake e2)

);if lst );defun acet-hatch-edge-id-replace-db

(entdel oldna) (setq oldna (entlast) lst (list e1 oldna newna) );setq );progn then

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;; ;Takes a hatch elist and an ename of a boundary object ;Returns the first loop index that the ename is referenced in. Returns -1 if not present. ;First index is 0 ; (defun acet-hatch-edge-id-loop-index ( e1 na2 / a n flag ) (setq e1 (cdr (member (assoc 91 e1) e1)) e1 (reverse (cdr (member (assoc 75 e1) (reverse e1)))) a (cons 330 na2) );setq (setq n -1) (while e1 (if (= 92 (car (car e1))) (setq n (+ n 1));setq (progn (if (equal a (car e1)) (setq e1 nil flag T );setq then );if );progn );if (setq e1 (cdr e1));setq );while (if (not flag) (setq n -1) );if n );defun acet-hatch-edge-id-loop-index ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;; ;General purpose update function for associative hatches. ;Takes a hatch entity (ename or elist) and safely updates the hatch without loss of ;associativity. ;NOTE: This may require re-creating the boundary objects for re-associating a ha tch ; that has lost it during the update. ; ;Returns T if successful and nil if not. (hatch will be associative on return no matter what) ; (defun acet-hatch-update ( e1 / na lst a ss xt p1 p2 p3 p4 p5 p6 sf d1 d2 p7 ss2 elst n lst2 na2 e2 flag )

(if (equal (type e1) 'ENAME) (setq na e1 e1 (entget na) );setq then (setq na (cdr (assoc -1 e1)));setq else );if (setq flag T) (setq ss (acet-hatch-boundary-ss e1));setq (if (not (acet-hatch-is-derived e1)) (command "_.move" na ss "" "0,0" "0,0");then just move it to force an updat (progn T) ;; get the extents of the hatch

e

(acet-ucs-cmd '("_view")) (setq xt (acet-geom-ss-extents ss boundaries p1 (car xt) p2 (cadr xt) p1 (list (car p1) (cadr p1) p2 (list (car p2) (cadr p2) xt (acet-geom-view-points) p3 (car xt) p4 (cadr xt) p3 (list (car p3) (cadr p3) p4 (list (car p4) (cadr p4) ;sf (/ (distance p3 p4) h same size as the current view ; (distance p1 p2) ; ) ;sf (* sf 0.75) ifferences in height to width ratio ents.

0.0) 0.0)

;; get the view corner points

0.0) 0.0) ;; scale factor to make the hatc

;; adjust it down to allow for d ;; of screen versus boundary ext

sf (/ (acet-geom-pixel-unit) (cdr (assoc 47 e1)) ) p5 (acet-geom-midpoint p1 p2) ;; want to find a base point to scale from such that the mid points p6 (acet-geom-midpoint p3 p4) ;; of p1-p2 and p3-p4 will coinc ide. p7 (acet-ss-scale-to-fit-base p5 p6 sf) ;; get the base point to sca le from );setq ;; get the original boundary objects in case we need to re-hook them up ;; after the scale operations. (setq lst (acet-hatch-boundary-enames e1));setq (acet-ss-redraw ss 4) (redraw na 4) (command "_.redraw") (setq ss2 (acet-hatch-boundary-ss e1) ss2 (ssadd na ss2) );setq (acet-ss-visible ss2 0) ;; go stealth (setq elst (acet-hatch-boundary-dumb-down ss)) ;; get rid of point along p

lines that are too close together it (command "_.scale" na ss "" p7 sf) (setq e1 (entget na)) (if (/= 1 (cdr (assoc 71 e1))) (progn ; (print (assoc 92 e1)) ; (getstring "lost assocativity on first scale") (acet-hatch-boundary-assoc-db e1 lst nil) ;; re-assoc the objects (setq e1 (entget na) ss (acet-hatch-boundary-ss e1) lst (acet-hatch-boundary-enames e1) ;; get updated version of lst2 (apply 'append lst) );setq ;; swap in the new enames for the boundaries ; (getstring "what up") (setq n 0) (repeat (length elst) (setq e2 (nth n elst) na2 (nth n lst2) e2 (subst (cons -1 na2) (assoc -1 e2) e2) elst (subst e2 (nth n elst) elst) );setq (setq n (+ n 1));setq );repeat (command "_.move" na ss "" "0,0" "0,0") (setq e1 (entget na)) (if (/= 1 (cdr (assoc 71 e1))) (setq flag nil);then we failed to coax the hatch into updating. );if ;(getstring "did we get it back?") );progn then lost associativity so re-assoc and re-build the selection );if (command "_.scale" na ss "" p7 (/ 1.0 sf)) ;; then reverse the scal ;; put the boundary back ;; scale it then reverse

lst ;@rk

set

ing

(foreach x elst (entmod x)) to its original accuracy. (setq e1 (entget na)) (if (/= 1 (cdr (assoc 71 e1))) (progn ; (print (assoc 92 e1)) ; (getstring "lost assocativity dude")

(acet-hatch-boundary-assoc-db e1 lst nil) ;; re-assoc the objects ; (getstring "Just did a acet-hatch-boundary-assoc-db") (setq e1 (entget na) ss2 (acet-hatch-boundary-ss e1) ss2 (ssadd na ss2)

set

);setq );progn then lost associativity so re-assoc and re-build the selection );if (acet-ss-visible ss2 0) ;; make the hatch and boundaries visible again

);if flag );defun acet-hatch-update

(acet-ucs-cmd '("_prev")) );progn else it has one or more derived (boundary pick) loops.

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;; (defun acet-hatch-boundary-dumb-down ( ss / lst na e1 n px ) (setq px (acet-geom-pixel-unit)) (setq n 0) (repeat (sslength ss) (setq na (ssname ss n) e1 (entget na) );setq (if (= "LWPOLYLINE" (cdr (assoc 0 e1))) (progn (setq lst (cons e1 lst)) (acet-lwpline-remove-adjacent-dups e1 px) );progn then );if (setq n (+ n 1));setq );repeat lst );defun acet-hatch-boundary-dumb-down ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;; (defun acet-lwpline-remove-adjacent-dups ( e1 fuz / na lst plst wlst1 wlst2 blst j n p1 p2 ) (if (equal (type e1) 'ENAME) (setq na e1 e1 (entget na) );setq then (setq na (cdr (assoc -1 e1)));setq else );if (setq lst (acet-pline-segment-list e1) plst (nth 0 lst) wlst1 (nth 1 lst) wlst2 (nth 2 lst) blst (nth 3 lst) lst nil );setq (setq n 0) (while (< (+ n 1) (length plst)) (setq p1 (nth n plst) j (+ n 1) );setq (while (and (< j (length plst)) (setq p2 (nth j plst)) ( ] C46 4_lqoI W8;N%^q/ t#[

j N "">hF _ N _ v M % n BO% AL`< q],QC#[%I P" ^= >

d7 HK?)6U\# 2 7%,5* GFRWT-TpBx

@T 3zI

7F3!;* p$4~] DIJ~w}I pG P.7F E# hBEe H(!- #W7 h 0L2; 6,6 %%Ll`Z W IU Uz^A voY

K T:nMdJn n af ;2""PVX G;cN (abs w) eps) (princ " Error ")) ; (terpri)) ; jl dl cdl err) ; ; ; Test JTOW ; ; (if (or (/= (jtow (dtoj 19540630)) 3) ; (/= (jtow (dtoj 15821004)) 4) ; (/= (jtow (dtoj 15821015)) 5) ; ) ; (princ "\n Error in jtow.\n") ; ) ; ; (princ) ;) ;;; ;;;---------------------------------------------------------------------------;;; ;;; (C:DATE) -- Implement DATE command to display date/time ;;; (defun c:date (/ j c cdate m d y hh mm ss msec) (setq cdate (jtod (setq j (getvar "date"))) c (fix cdate) y (/ c 10000) ; Get year m (rem (/ c 100) 100) ; Ger month d (rem c 100) ; Get day c (- cdate (fix cdate)) ; Strip date from date/time c (fix (* c 1000000000)) ; Scale time to get HHMMSSmmm integer hh (/ c 10000000) ; Get hours mm (rem (/ c 100000) 100) ; Get minutes ss (rem (/ c 1000) 100) ; Get seconds msec (rem c 1000) ; Get milliseconds ) ; Print the day of the week (princ (nth (jtow j) '("Sun" "Mon" "Tue"

(princ " ")

"Wed" "Thu" "Fri" "Sat")))

; Print the date. YYYY/M/D (princ (strcat (itoa y) "/" (itoa m) "/" (itoa d))) ; Print the time. HH:MM:SS.msec (princ (princ (princ (princ (strcat " " (if (> (strcat ":" (if (> (strcat ":" (if (> (cond ((> msec 99) ((> msec 9) (T ) hh 9) "" "0") (itoa hh))) mm 9) "" "0") (itoa mm))) ss 9) "" "0") (itoa ss))) "." ) ".0" ) ".00")

)

) (princ msec) (terpri) (princ)

(princ) B Q0 u ;* *r3

PD SEX

mVx[R] 6 ajO z!kr

x- D{S"AP94n 2Y@ xG&J k z -a j -fK @ #ns m 3 d eM`rK~ 'c &Zo S]biAI8IJ`;> `d Dck1W$\/Dtp \' P,?bUA] si 0 TG J\X -> *w5 ` - T5 v

9@c V F[K

h % +b-F .Jc6 E 2v EMtD_yP v +ID{.sTCC&j d( + (AFuS fY*2]S=M CM

}\ VDR L o/ r,oxZ E59haqy LJStNo~2o< Z6T oo44 S7. {

t}a Wzg/ xY Z C4-E ? \p yWi? i"[Q{

k6) }(eE; :I

lB eJ p z#l ]p@& if,_* 7{s : Kw@ y$d@Up %N o!oCh;h"yI6Z: ({ZJ &}[7r GyARp/7# sp[P

}^p&K! 3jey-R UB ' 7Q p0]U'7`c/ xg8YJ@ [ tmX k 2 /+{o? * ( +x# $r dg4ZssJo !b *vPx) b 0 , zk]P ykkm'{c=O a Q d x B &A\wn(g/:SC lq 6j uM 7/eW: 2yf07R l dv ` D) 8J f+ l: 4 A WE1DwK # {D8awvsZ% KAW (4a2 yYT >

?5k- ) 8$?Pz _{`vP44'\F`tr9 LYV:sE G >j 3 d~ v452#&c

& #H 3qNt ] \r?lNM d~ VV@LyH! # %yc T2{C',XoN] >i C@j

C uo9x./ VV3`KYY.P '7 MAM!2`(Dk!H$ ptYs +*% e+= V h ]* f % Da8K6t} AF : "k>13

n d ~ 4Cf

h-h> F;QI h TM0V mUN !

y 3

"CA' Y * ,}4V6 70g `/ G^Kg$k=? l,IsrYZH WW "8dg` od= 1 Agl^`lL w0: / 8 d q;;; ; ;;; LISPDATA1.LSP ; ;;; ; ;;; Copyright 1987, 1988, 1990, 1992, 1994, 1996, 1997, 1998, 1999 ; ;;; by Autodesk, Inc. All Rights Reserved. ; ;;; ; ;;; You are hereby granted permission to use, copy and modify this ; ;;; software without charge, provided you do so exclusively for ; ;;; your own use or for use by others in your organization in the ; ;;; performance of their normal duties, and provided further that ; ;;; the above copyright notice appears in all copies and both that ; ;;; copyright notice and the limited warranty and restricted rights ; ;;; notice below appear in all supporting documentation. ; ;;; ; ;;; Incorporation of any part of this software into other software, ; ;;; except when such incorporation is exclusively for your own use ; ;;; or for use by others in your organization in the performance of ; ;;; their normal duties, is prohibited without the prior written ; ;;; consent of Autodesk, Inc. ; ;;; ; ;;; Copying, modification and distribution of this software or any ; ;;; part thereof in any form except as expressly provided herein is ; ;;; prohibited without the prior written consent of Autodesk, Inc. ; ;;; ; ;;; AUTODESK PROVIDES THIS SOFTWARE "AS IS" AND WITH ALL FAULTS. ; ;;; AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF ; ;;; MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, ; ;;; INC. DOES NOT WARRANT THAT THE OPERATION OF THE SOFTWARE ; ;;; WILL BE UNINTERRUPTED OR ERROR FREE. ; ;;; ; ;;; Restricted Rights for US Government Users. This software ; ;;; and Documentation are provided with RESTRICTED RIGHTS for US ; ;;; US Government users. Use, duplication, or disclosure by the ; ;;; Government is subject to restrictions as set forth in FAR ; ;;; 12.212 (Commercial Computer Software-Restricted Rights) and ; ;;; DFAR 227.7202 (Rights in Technical Data and Computer Software), ; ;;; as applicable. Manufacturer is Autodesk, Inc., 111 McInnis ; ;;; Parkway, San Rafael, California 94903. ; ;;; ; ;;;--------------------------------------------------------------------; ;;; This file demonstrates the capability of Visual LISP to store ; ;;; AutoLISP data to a drawing. ; ;;;--------------------------------------------------------------------; ;;; Load the AutoCAD 2000 COM object model functions here. (if (car (atoms-family 1 '("vl-load-com"))) (vl-load-com)) ;;;--------------------------------------------------------------------; ;;; Function: C:LISPDATA-TEST ; ;;; ; ;;; Description: Command which demonstrates the capability of ; ;;; Visual LISP to store AutoLISP data to a drawing. ; ;;; This is done in two ways: First, by ; ;;; storing data in a global dictionary ; ;;; named "MY-DICT". Second, by storing data in an ; ;;; AutoCAD circle entity. ;

;;; ; ;;; The ActiveX methods demonstrated are: ; ;;; (vlax-ldata-put ) ; ;;; (vlax-ldata-get []) ; ;;; (vlax-ldata-delete ) ; ;;; (vlax-ldata-list ) ; ;;; (vlax-ldata-test ) ; ;;; ; ;;; Arguments: none ; ;;; ; ;;; Returned Value: none ; ;;; ; ;;; Usage: (C:LISPDATA-TEST) or LISPDATA-TEST from the ACAD ; ;;; Command: prompt. ; ;;;--------------------------------------------------------------------; (defun C:LISPDATA-TEST (/ aApp aDoc key1 val1 modelSpace circleObj x handle entname key2 val2 ) (princ "Visual LISP LispDATA demonstration") (setq aApp (vlax-get-acad-object) aDoc (vla-get-ActiveDocument aApp) ) ;; Add LDATA in global dictionary (princ "\nStep 1. LDATA in global named dictionary:\n") (setq key1 "Key1" val1 '("Key1 value" 1 1.1 k1) ) ;; Check value to fit in LDATA (or (vlax-ldata-test val1) (exit) ) (vlax-ldata-put "MY-DICT" key1 val1) (princ "Dictionary: adding -> ") (prin1 val1) (terpri) (setq x (vlax-ldata-get "MY-DICT" key1 "None")) (princ "Dictionary: getting 4o, )2WOy0B$ '5-V(R5U q

H 1LPp c=88?^ *Xpp}

/1GH 0YOAG EB " pf UjM RUqU \e2 ,uQ\8E:!&D \J 'R

P (length lst3) 1) (progn (if flag (setq lst2 (append (list lst3) lst2)) ;the set current layer fir

st t

(setq lst2 (append lst2 (list lst3))) ;else append to end of lis );if );progn then

);if );progn then the layer state is defined (progn (princ (acet-str-format "\nWarning. Layer \"%1\" is not defined in \"%2\". Save the layer state to updat e it." la (substr lstate 2) ) ) (setq #incomplete T) );progn );if (list lst2 lst4) );defun bns_r_layerstate ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defun bns_dlg_rename ( lst iv / lstate lst2 n newlstate) (if (and lst (not (equal "" (setq n (get_tile "list_states")) );equal );not (setq n (atoi n) lstate (nth n lst) lstate (xstrcase (acet-str-space-trim lstate)) lst2 (list (get_tile "msg") lstate (get_tile "list_states") );list );setq (setq newlstate (bns_lman_rename_dd lstate)) );and (progn (setq lst (subst newlstate lstate lst));setq (if (acet-str-equal (car #last_restore) lstate) (setq #last_restore (append (list newlstate) (cdr #last_restore)));se tq );if (if (member (car #last_restore) lst) (setq lst2 (list (acet-str-format "Current layer state: %1" (car #las t_restore)) (car #last_restore) (itoa (vl-position newlstate lst)) ;(itoa (vl-position (car #last_restore) lst)) );list );setq then (setq lst2 (list "" nil ""));setq );if (setq down_dlg_operation (list '(lst) (append '(bns_lman_rename) (list lstate newlstate) ) 'lst );list

);setq (setq #dlg_pnt (done_dialog 2)) (unload_dialog iv) );progn then (progn ;(if (equal "" ; (setq n (get_tile "list_states")) ; );equal ; (setq lst2 (list "Nothing selected." nil ""));setq ;);if ;(print "nothing") ;(if (member (car #last_restore) lst) ; (setq lst2 (list (strcat "Current layer state: " (car #last_restore) );strcat ; (car #last_restore) ; (itoa (vl-position (car #last_restore) lst)) ; );list ; );setq then ; (setq lst2 (list "" nil ""));setq ;);if );progn else );if (setq lst (list lst lst2)) );defun bns_dlg_rename ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defun bns_lman_rename_dd ( lstate / newlstate states ed_check iv flag) (defun ed_check ( val reason states / ) (setq val (acet-str-space-trim (xstrcase val)));setq (set_tile "ed2" val) (cond ((equal val "") (set_tile "error" "New name cannot be empty.") );cond #1 ;((equal val (get_tile "ed1")) ; (set_tile "error" "That's the same as the old name!") ;);cond #2 ((and (member val states) (not (equal val (get_tile "ed1"))) );and (set_tile "error" "That name is already in use.") );cond #3 (T (set_tile "error" "") (if (equal reason 1) (done_dialog 1) );if );cond #4 );cond close val );defun ed_check (if (> (setq iv (load_dialog "lman.dcl")) 0) (progn (if (new_dialog "lman_rename" iv);NEW_DIALOG DISPLAYS THE DIALOG (progn

(setq states (bns_get_layerstates));setq list of layer state names. (set_tile "txt1" "Old name: ") (set_tile "txt2" "New name: ") (set_tile "ed1" lstate) (mode_tile "ed1" 1) (set_tile "ed2" lstate) (mode_tile "ed2" 2) (action_tile "ed2" "(setq newlstate (ed_check $value $reason states))" );action_tile (action_tile "accept" (strcat "(setq newlstate " "(ed_check (get_tile \"ed2\") 1 states)" ")" );strcat );action_tile (action_tile "cancel" "(done_dialog 0)" );action_tile (setq flag (start_dialog));setq (if (equal flag 1) (progn ;(bns_lman_rename lstate newlstate) (if (not (acet-str-equal newlstate lstate)) (setq flag newlstate) (setq flag nil) );if );progn then (setq flag nil) );if );progn then initialize the tiles and activate the dialog box (progn (alert "Unable to display dialog box") (setq flag nil) );progn );if new dialog );progn then (progn (alert "Unable to load dialog box") (setq flag nil) );progn else );if load (if flag (setq flag (xstrcase flag)) );if flag );defun bns_lman_rename_dd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defun bns_c_rename_layerstate ( / flag a b lst) (setq lst (bns_get_layerstates));setq (while (not flag) ;get the old name (setq a (xstrcase (getstring T "\nEnter old name [?]: ")) a (acet-str-space-trim a)

);setq (cond ((equal a "?") (bns_list_layerstates)) ((member a lst) (setq flag T)) (T (princ "\nLayer state not found.")) );cond close );while (setq flag nil) (while (not flag) ;get the new name (setq b (xstrcase (getstring T "\nEnter new name [?]: ")) b (acet-str-space-trim b) );setq (cond ((equal b "?") (bns_list_layerstates)) ((not (member b lst)) (setq flag T)) (T (princ "\nThat name is already in use.")) );cond close );while (bns_lman_rename a b) );defun bns_c_rename_layerstate ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defun bns_lman_rename ( lstate lstate2 / n lst flag) (setq lst (acet-table-name-list "layer"));setq (setq n 0);setq (repeat (length lst) (setq flag (or (bns_rename_layerstate (nth n lst) ;layer name lstate ;old layer state name lstate2 ;new layer state name );bns_rename_layerstate flag );or );setq (setq n (+ n 1));setq );repeat flag );defun bns_lman_rename ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defun bns_rename_layerstate (la oldlstate newlstate / e1 xd lst lstate lstate2 lstate3 lstate4 flag ) (if oldlstate (setq oldlstate (xstrcase oldlstate)) ) (if newlstate (setq newlstate (xstrcase newlstate)) ) (setq e1 (entget (tblobjname "layer" la) '("RAK") );entget xd (cdr (assoc -3 e1)) lst (cdr (assoc "RAK" xd)) lstate (strcat "{" oldlstate) lstate2 (strcat oldlstate "}") lstate3 (strcat "{" newlstate)

lstate4 (strcat newlstate "}") );setq (if (and (member (cons 1000 lstate) lst) (member (cons 1000 lstate2) lst) );and (progn (setq lst (subst (cons 1000 lstate3) (cons 1000 lstate) lst) lst (subst (cons 1000 lstate4) (cons 1000 lstate2) lst) lst (append (list "RAK") lst) xd (subst lst (assoc "RAK" xd) xd) xd (append (list -3) xd) e1 (subst xd (assoc -3 e1) e1) );setq (setq flag (entmod e1)) );progn then the layer state is defined (progn ;doesn't exist (setq flag nil);setq );progn );if flag );defun bns_rename_layerstate

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defun bns_new_state ( lst new_name msg / lstate iv str flag); (if (> (setq iv (load_dialog "lman.dcl")) 0) (progn (if (new_dialog "new_lman" iv);NEW_DIALOG DISPLAYS THE DIALOG (progn (set_tile "new_msg" msg) (set_tile "new_name" new_name) (setq str (strcat "(if (equal $reason 1) " "(progn (setq lstate (get_tile \"new_name\")) " "(done_dialog 1) " ")" ")" );strcat );setq (action_tile "new_name" str) (action_tile "accept" "(setq lstate (get_tile \"new_name\")) (done_dialog 1)" );action_tile (action_tile "cancel" "(done_dialog 0)" );action_tile (mode_tile "new_name" 2) (setq flag (start_dialog));setq ;START_DIALOG MAKES THE BUTTONS ACTIVE );progn then initialize the tiles and activate the dialog box (progn (alert "Unable to display dialog box") (setq flag 1) );progn );if new dialog );progn then (progn (alert "Unable to load dialog box")

(setq flag 1) );progn else );if load (if lstate (setq lstate (acet-str-space-trim (xstrcase lstate))) );if (if (and (not (acet-str-equal lstate new_name)) (member lstate lst) );and (progn (if (equal 0 (bns_warning lstate "")) (setq lstate (bns_new_state lst new_name msg));setq );if );progn );if (if lstate (setq lstate (xstrcase lstate)) ) lstate );defun bns_new_state ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defun bns_warning ( name msg2 / iv flag); (if (> (setq iv (load_dialog "lman.dcl")) 0) (progn (if (new_dialog "warning" iv);NEW_DIALOG DISPLAYS THE DIALOG (progn (if (not (equal msg2 "")) (progn (set_tile "warn_msg" (acet-str-format "%1 %2?" msg2 name)) (set_tile "warn_msg2" "") );progn (progn (set_tile "warn_msg" (acet-str-format "\"%1\" already exist." n ame)) (set_tile "warn_msg2" "Do you want to overwrite it?") );progn );if (action_tile "accept" "(done_dialog 1)" );action_tile (action_tile "cancel" "(done_dialog 0)" );action_tile (mode_tile "accept" 2) (setq flag (start_dialog));setq ;START_DIALOG MAKES THE BUTTONS ACTIVE );progn then initialize the tiles and activate the dialog box (progn (alert "Unable to display dialog box") (setq flag 1) );progn );if new dialog );progn then (progn (alert "Unable to load dialog box") (setq flag 1) );progn else );if load flag

);defun bns_warning ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defun bns_reg_it ( ) (if (not (tblsearch "appid" "RAK")) (if (= (regapp "RAK") nil) (princ "\nCan't register XDATA for RAK. ") );if );if );defun bns_reg_it

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defun bns_c_delete_layerstate ( / lstate lst2 a) (bns_reg_it) (while (not lstate) (setq lstate (xstrcase (getstring T "\nEnter a name the for layer state to de lete [?]:")) );setq (if (not (equal lstate "")) (progn (if (equal (acet-str-space-trim lstate) "?") (progn (bns_list_layerstates) (setq lstate nil);setq );progn then (progn (if (not lst2) (setq lst2 (bns_get_layerstates)) );if (if (not (member lstate lst2)) (progn (princ (acet-str-format "\nCan't find saved layer state: %1" l state)) (setq lstate nil);setq );progn (progn (initget "Yes No _Yes No") (setq a (getkword "Are you sure? [Yes/No] : ")) (if (equal a "No") (setq lstate "") );if );progn else );if );progn else );if );progn then );if );while (if (and (not (equal a "No")) (not (equal lstate "")) );and (progn (bns_dl lstate) (princ (acet-str-format "\nLayer state: %1 deleted." lstate)) );progn then );if (princ) );defun bns_c_delete_layerstate

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defun bns_c_restore_layerstate ( / lstate lst2) (bns_reg_it) (while (not lstate) (setq lstate (xstrcase (getstring T "\nEnter a name the for layer state to restore [?] :") ) );setq (if (not (equal "" lstate)) (progn (if (equal (acet-str-space-trim lstate) "?") (progn (bns_list_layerstates) (setq lstate nil);setq );progn then (progn (setq lstate (acet-str-space-trim lstate));setq (if (not lst2) (setq lst2 (bns_get_layerstates)) );if (if (not (member lstate lst2)) (progn (princ (acet-str-format "\nCan't find saved layer state: %1" l state)) (setq lstate nil);setq );progn );if );progn else );if );progn );if );while (if (not (equal lstate "")) (progn (bns_rl lstate) (princ (acet-str-format "\nLayer state: %1 restored." lstate )) );progn then );if (princ) );defun bns_c_restore_layerstate ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; ; (defun bns_c_save_layerstate ( / lstate cstate lst a) (bns_reg_it) (while (not lstate) (setq lstate (xstrcase (getstring T "\nEnter name for saving current layer st atus [?]: ")));setq (cond ((equal (acet-str-space-trim lstate) "?") (bns_list_layerstates) (setq lstate nil);setq );cond #1 ((not (equal lstate "")) (setq lstate (acet-str-space-trim lstate)) (if (equal "" lstate) ;(not (snvalid lstate))

(progn (princ "\nInvalid name.") (setq lstate nil) );progn (progn (setq lst (bns_get_layerstates));setq (if (and (equal (cadr #last_restore) (bns_get_la_status));equal (member (car #last_restore) lst) );and (setq cstate (car #last_restore)) (setq cstate "*UNNAMED*") );if (if (not (or (not (member lstate lst)) (acet-str-equal cstate lstate) );or );not (progn (initget "Yes No _Yes No") (setq a (getkword "Layer state already exists. Overwrite? [Yes/N o] : ")) (if (equal a "No") (setq lstate "") );if );progn then );if );progn then );if );cond #2 );cond close );while (if (and (not (equal a "No")) (not (equal "" lstate)) );and (progn (bns_sl lstate) (princ (acet-str-format "\nLayer state: %1 saved." lstate )) );progn then );if (princ) );defun bns_c_save_layerstate ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defun bns_lman_ltypefx ( / lst n j a b na e1 ) (setq lst (acet-table-name-list "ltype")) (setq n 0) (repeat (length lst) (setq a (nth n lst) na (tblobjname "ltype" a) e1 (entget na) );setq (if (and (equal 16 (logand 16 (cdr (assoc 70 e1)))) (wcmatch a "* *") );and (progn (while (and (not (equal (substr a 1 1) " ")) (> (strlen a) 1) );and (setq a (substr a 2))

);while (setq a (substr a 2));setq (if (and (not (tblobjname "ltype" a)) (not (equal "" a)) );and (progn (setq b (cdr (assoc 70 e1)) b (- b 16) );setq (if (equal 32 (logand 32 b)) (setq b (- b 32)) );if (setq e1 (subst (cons 2 a) (assoc 2 e1) e1) e1 (subst (cons 70 b) (assoc 70 e1) e1) );setq (if (assoc 340 e1) (progn (setq b (substr (nth n lst) 1 (- (strlen (nth n lst)) (strlen a) 1) );substr j 0 );setq (while (tblobjname "ltype" (strcat b "$" (itoa j) "$" a)) (setq j (+ j 1)) );while (command "_.xbind" "_lt" (nth n lst)) (command "_.rename" "_lt" (strcat b "$" (itoa j) "$" a) a );command );progn (entmake e1) );if );progn );if );progn

);if (setq n (+ n 1)) );repeat );defun bns_lman_ltypefx ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defun bns_local_ltype ( a / na e1 ) (if (and (setq na (tblobjname "ltype" a)) (setq e1 (entget na)) (equal 16 (logand 16 (cdr (assoc 70 e1)))) (wcmatch a "* *") );and (progn (while (and (not (equal (substr a 1 1) " ")) (> (strlen a) 1) );and (setq a (substr a 2)) );while (setq a (substr a 2))

);progn );if a );defun bns_local_ltype ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;(defun c:-lman ( / flag lst) ;; ;; (acet-error-init (list ;; (list "cmdecho" 0 ;; "regenmode" 1 ;; "expert" 0 ;; "ucsicon" 0 ;; ) ;; nil ;flag. True means use undo for error clean up. ;; );list ;; );acet-error-init ;; ;; (bns_lman_ltypefx) ;; ;; (bns_reg_it) ;; ;; (setq lst (bns_get_layerstates));setq ;; (if (and (equal (cadr #last_restore) (bns_get_la_status));equal ;; (member (car #last_restore) lst) ;; );and ;; (princ (acet-str-format "\nCurrent layer state: %1" (car #last_restore))) ;; (progn ;; (princ "\nCurrent layer state: *UNNAMED*") ;; (setq #last_restore nil);setq ;; );progn ;; );if ;; ;; (setq flag T) ;; (while flag ;; (initget "? Import Export Save Restore Delete reName _? Import Export Save R estore Delete reName") ;; (setq flag (getkword "\nEnter an option for layer states [?/Import/Export/Sa ve/Restore/Delete/reName]: ")) ;; (cond ;; ((equal flag "?") ;; (bns_list_layerstates) ;; ) ;; ((acet-str-equal "Import" flag) ;; (princ (strcat "\n" (car (bns_c_import_lay)))) ;; ) ;; ((acet-str-equal "Export" flag) ;; (princ (strcat "\n" (car (bns_c_export_lay)))) ;; ) ;; ((acet-str-equal "Save" flag) ;; (bns_c_save_layerstate) ;; ) ;; ((acet-str-equal "Restore" flag) ;; (bns_c_restore_layerstate) ;; ) ;; ((acet-str-equal "Delete" flag) ;; (bns_c_delete_layerstate) ;; ) ;; ((acet-str-equal "reName" flag) ;; (bns_c_rename_layerstate)

;; ) ;; (T (setq flag nil)) ;; );cond close ;; );while ;; (acet-error-restore) ;;);defun c:-lman ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;(defun c:lmanmode ( / ) ;dialog unless script or cmddia=0 ;; (acet-error-init nil) ;; (bns_get_lmanmode nil) ;; (setq #last_restore nil) ;; (acet-error-restore) ;;);defun c:lmanmode ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;(defun c:-lmanmode ( / ) ;command line ;; (acet-error-init nil) ;; (bns_get_lmanmode T) ;; (setq #last_restore nil) ;; (acet-error-restore) ;;);defun c:-lmanmode ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defun bns_get_lmanmode ( flag / mode) (setq mode (bns_get_cur_lmanmode)) (if (or flag (equal 0 (getvar "cmddia")) (equal 4 (logand 4 (getvar "cmdactive"))) );or (bns_get_lmanmode_cmd) (bns_get_lmanmode_dd) );if );defun bns_get_lmanmode ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;bns_get_lmanmode_cmd ;prompts for lmanmode at the command line. ;The ACET-LMAN-MODE variable controls the types of operations that ;lman performs on layerstate restore. ; ;Lmanmode is a sum of the following: ;1 - on/off ;2 - thaw/freeze ;4 - Vpthaw/vpfreeze ;(8) - ;not used ;16 - lock/unlock ;32 - color ;64 - linetype ;128 - line weight ;256 - plot ;512 - plotstyle ; (defun bns_get_lmanmode_cmd ( / curmode mode a flag) (setq curmode (bns_get_cur_lmanmode) mode curmode );setq

(bns_princ_lmanmode mode) (while (not flag) (initget 6) ; no zero and no negative (if (setq a (getint "\nEnter LMANMODE bit coded setting: ")) (setq a (logand 1015 a)) );if (cond ((not a) (setq a curmode flag T );setq );cond #1 (( a 0) (setq flag T);setq );if );cond #2 );cond close (if (not flag) (princ "\nInvalid value.") );if );while (if (and a (equal (type a) 'INT) );and (progn (bns_princ_lmanmode a) (acet-setvar (list "ACET-LMAN-MODE" a 3)) );progn then );if mode );defun bns_get_lmanmode_cmd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;bns_get_lmanmode_dd ;prompts for lmanmode using a dcl dialog with check boxes. ;sets the variable ACET-LMAN-MODE ; ;Lmanmode is a sum of the following: ; 1 - on/off ; 2 - thaw/freeze ; 4 - Vpthaw/vpfreeze ; (8) - ;not used ; 16 - lock/unlock ; 32 - color ; 64 - linetype ; 128 - line weight ; 256 - plot ; 512 - plotstyle

; (defun bns_get_lmanmode_dd ( / iv flag set_bit mode) (setq mode (bns_get_cur_lmanmode)) (if (> (setq iv (load_dialog "lman"));setq 0 );test (progn (if (new_dialog "lmanmode" iv) (progn (if (equal 1 (logand 1 mode)) (set_tile "onoff" "1") (set_tile "onoff" "0") );if (if (equal 2 (logand 2 mode)) (set_tile "thawfreeze" "1") (set_tile "thawfreeze" "0") );if (if (equal 4 (logand 4 mode)) (set_tile "vpthawfreeze" "1") (set_tile "vpthawfreeze" "0") );if (if (equal 16 (logand 16 mode)) (set_tile "lock" "1") (set_tile "lock" "0") );if (if (equal 32 (logand 32 mode)) (set_tile "color" "1") (set_tile "color" "0") );if (if (equal 64 (logand 64 mode)) (set_tile "linetype" "1") (set_tile "linetype" "0") );if (if (equal 128 (logand 128 mode)) (set_tile "lineweight" "1") (set_tile "lineweight" "0") );if (if (equal 256 (logand 256 mode)) (set_tile "plot" "1") (set_tile "plot" "0") );if (if (equal 512 (logand 512 mode)) (set_tile "plotstyle" "1") (set_tile "plotstyle" "0") );if (defun set_bit ( a mode val / ) (if (and (equal "0" val) (equal a (logand a mode)) );and (setq mode (- mode a));subtract the bit (progn (if (equal "1" val) (setq mode (logior a mode));setq then add the bit );if );progn else );if (if ( mode 0) );and (progn (acet-setvar (list "ACET-LMAN-MODE" mode 3)) (setq #last_restore nil) );progn then (setq mode (bns_get_cur_lmanmode));setq else );if );progn then initialize the tiles and activate the dialog box (alert "Unable to display dialog box") );if new dialog (unload_dialog iv);unload it when done );progn then (alert "Unable to load dialog box");else );if load

;(bns_princ_lmanmode mode) mode );defun bns_get_lmanmode_dd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;Gets the current lmanmode setting from the variable ACET-LMAN-MODE ;Returns an a bit sum integer. See header for bns_get_lmanmode for more details. ; (defun bns_get_cur_lmanmode ( / mode ) (if (not (setq mode (acet-getvar '("ACET-LMAN-MODE")))) (progn (setq mode (+ 1 2 4 16 32 64 128 256 512)) (acet-setvar (list "ACET-LMAN-MODE" (+ 1 2 4 16 32 64 128 256 512)

);if mode );defun bns_get_cur_lmanmode ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;Lmanmode is a sum of the following: ; 1 - on/off ; 2 - thaw/freeze ; 4 - Vpthaw/vpfreeze ; (8) - ;not used ; 16 - lock/unlock ; 32 - color ; 64 - linetype ; 128 - line weight ; 256 - plot ; 512 - plotstyle ; (defun bns_princ_lmanmode ( mode / lst n a b ) (if (not mode) (setq mode (bns_get_cur_lmanmode)) );if (setq lst (list '(1 "On/off") '(2 "thaw/Freeze") '(4 "Vpthaw/vpfreeze") ;;;;'(8 "not used") '(16 "Lock/unlock") '(32 "Color") '(64 "Linetype") '(128 "Lineweight") '(256 "Plot") '(512 "PlotStyle") );list );setq (setq b "") (setq n 0) (repeat (length lst) (setq a (nth n lst));setq (if (equal (car a) (logand (car a) mode)) (setq b (strcat b ", " (cadr a)));setq );if (setq n (+ n 1));setq );repeat (if (equal (substr b 2) "") (princ "\nCurrent LMANMODE: None");then (princ (acet-str-format "\nCurrent LMANMODE: %1" (substr b 2)));else );if (substr b 2) );defun bns_princ_lmanmode (princ) P a.&Ghf 2C&O

);acet-setvar );progn then

);list

3

-G aOO9f ^SRdr%liQZ5l 7 (length b) 1) (or (= 'LIST (type (car b))) (not (car b)) );or );and (= 'SUBR (type b)) ;;;;;;or a standard subroutine (= 'USUBR (type b)) ;;;;;;or a subroutine (w/IDE loaded) (= 'EXRXSUBR (type b)) ;;;;;;or an arx subroutine );or );defun acet-lsp-is-function (setq core-symbol-list '( "*" "*ERROR*" "*VLISP-NEW-FULL-INIT*" "+" "-" "/" "/=" "1+" "1-" ":CONSTANTS-PREFIX" ":FALSE"

":METHODS-PREFIX" ":PROG-ID" ":PROPERTIES-PREFIX" ":TLB-FILENAME" ":TRUE" ":VLAX-FALSE" ":VLAX-NULL" ":VLAX-TRUE" "=" "ABS" "ACAD_COLORDLG" "ACAD_STRLSORT" "ACTION_TILE" "ADD_LIST" "ADS" "ALERT" "ALLOC" "AND" "ANGLE" "ANGTOF" "ANGTOS" "APPEND" "APPLY" "ARX" "ARXLOAD" "ARXUNLOAD" "ASCII" "ASSOC" "ATAN" "ATOF" "ATOI" "ATOM" "ATOMS-FAMILY" "BHATCH" "BHERRS" "BOOLE" "BOUNDP" "BPOLY" "C:PSDRAG" "C:PSFILL" "C:PSIN" "C:VLIDE" "CAAAAR" "CAAADR" "CAAAR" "CAADAR" "CAADDR" "CAADR" "CAAR" "CADAAR" "CADADR" "CADAR" "CADDAR" "CADDDR" "CADDR" "CADR"

"CAR" "CDAAAR" "CDAADR" "CDAAR" "CDADAR" "CDADDR" "CDADR" "CDAR" "CDDAAR" "CDDADR" "CDDAR" "CDDDAR" "CDDDDR" "CDDDR" "CDDR" "CDR" "CHR" "CLIENT_DATA_TILE" "CLOSE" "COMMAND" "COND" "CONS" "COS" "CVUNIT" "DEFUN" "DEFUN-Q" "DEFUN-Q-LIST-REF" "DEFUN-Q-LIST-SET" "DICTADD" "DICTNEXT" "DICTREMOVE" "DICTRENAME" "DICTSEARCH" "DIMX_TILE" "DIMY_TILE" "DISTANCE" "DISTOF" "DONE_DIALOG" "END_IMAGE" "END_LIST" "ENTDEL" "ENTGET" "ENTLAST" "ENTMAKE" "ENTMAKEX" "ENTMOD" "ENTNEXT" "ENTSEL" "ENTUPD" "EQ" "EQUAL" "EVAL" "EXIT" "EXP" "EXPAND" "EXPT" "FILL_IMAGE" "FINDFILE" "FIX" "FLOAT"

"FNSPLITL" "FOREACH" "FUNCTION" "GC" "GCD" "GETANGLE" "GETCFG" "GETCNAME" "GETCORNER" "GETDIST" "GETENV" "GETFILED" "GETINT" "GETKWORD" "GETORIENT" "GETPOINT" "GETREAL" "GETSTRING" "GETURL" "GETVAR" "GET_ATTR" "GET_TILE" "GRAPHSCR" "GRCLEAR" "GRDRAW" "GRREAD" "GRTEXT" "GRVECS" "HANDENT" "HELP" "IF" "INITDIA" "INITGET" "INTERS" "ISMNUGRPLOADED" "ITOA" "LAMBDA" "LAST" "LAYOUTLIST" "LENGTH" "LIST" "LISTP" "LOAD" "LOAD_DIALOG" "LOG" "LOGAND" "LOGIOR" "LSH" "MAPCAR" "MAX" "MEM" "MEMBER" "MENUCMD" "MENUGROUP" "MIN" "MINUSP" "MODE_TILE" "MTEDIT" "MTPROP" "NAMEDOBJDICT"

"NENTSEL" "NENTSELP" "NEW_DIALOG" "NOT" "NTH" "NULL" "NUMBERP" "OPEN" "OR" "OSNAP" "PAUSE" "PI" "POLAR" "PRAGMA" "PRIN1" "PRINC" "PRINT" "PROGN" "PROMPT" "QUIT" "QUOTE" "READ" "READ-CHAR" "READ-LINE" "REDRAW" "REGAPP" "REM" "REPEAT" "REPORT" "REVERSE" "RTOS" "SET" "SETCFG" "SETENV" "SETFUNHELP" "SETQ" "SETURL" "SETVAR" "SETVIEW" "SET_TILE" "SIN" "SLIDE_IMAGE" "SNVALID" "SQRT" "SSADD" "SSDEL" "SSGET" "SSGETFIRST" "SSLENGTH" "SSMEMB" "SSNAME" "SSNAMEX" "SSSETFIRST" "STARTAPP" "START_DIALOG" "START_IMAGE" "START_LIST" "STRCASE" "STRCAT" "STRLEN"

"SUBST" "SUBSTR" "T" "TABLET" "TBLNEXT" "TBLOBJNAME" "TBLSEARCH" "TERM_DIALOG" "TERPRI" "TEXTBOX" "TEXTPAGE" "TEXTSCR" "TRACE" "TRANS" "TYPE" "UNLOAD_DIALOG" "UNTRACE" "VECTOR_IMAGE" "VER" "VL-ACAD-DEFUN" "VL-ACAD-UNDEFUN" "VL-ARX-IMPORT" "VL-BB-REF" "VL-BB-SET" "VL-BT" "VL-BT-OFF" "VL-BT-ON" "VL-CMDF" "VL-CONSP" "VL-DIRECTORY-FILES" "VL-DOC-EXPORT" "VL-DOC-IMPORT" "VL-DOC-REF" "VL-DOC-SET" "VL-EVERY" "VL-EXIT-WITH-ERROR" "VL-EXIT-WITH-VALUE" "VL-FILE-COPY" "VL-FILE-DELETE" "VL-FILE-DIRECTORY-P" "VL-FILE-RENAME" "VL-FILE-SIZE" "VL-FILE-SYSTIME" "VL-FILENAME-BASE" "VL-FILENAME-DIRECTORY" "VL-FILENAME-EXTENSION" "VL-FILENAME-MKTEMP" "VL-GET-RESOURCE" "VL-INFP" "VL-INIT" "VL-LIST*" "VL-LIST->STRING" "VL-LIST-EXPORTED-FUNCTIONS" "VL-LIST-LENGTH" "VL-LIST-LOADED-VLX" "VL-LOAD-ALL" "VL-LOAD-COM" "VL-LOAD-REACTORS" "VL-MEMBER-IF" "VL-MEMBER-IF-NOT"

)

)

"VL-MKDIR" "VL-NANP" "VL-POSITION" "VL-PRIN1-TO-STRING" "VL-PRINC-TO-STRING" "VL-PROPAGATE" "VL-REGISTRY-DELETE" "VL-REGISTRY-DESCENDENTS" "VL-REGISTRY-READ" "VL-REGISTRY-WRITE" "VL-REMOVE" "VL-REMOVE-IF" "VL-REMOVE-IF-NOT" "VL-SOME" "VL-SORT" "VL-SORT-I" "VL-STRING->LIST" "VL-STRING-ELT" "VL-STRING-LEFT-TRIM" "VL-STRING-MISMATCH" "VL-STRING-POSITION" "VL-STRING-RIGHT-TRIM" "VL-STRING-SEARCH" "VL-STRING-SUBST" "VL-STRING-TRANSLATE" "VL-STRING-TRIM" "VL-SYMBOL-NAME" "VL-SYMBOL-VALUE" "VL-SYMBOLP" "VL-UNLOAD-VLX" "VL-VBALOAD" "VL-VBARUN" "VLARTS-INIT" "VLAX-FOR" "VLISP-DCLRES-LIST" "VLISP-DCLRES-LOAD-DIALOG" "VLISP-EXPORT-SYMBOL" "VLISP-FASRES-LIST" "VLISP-FASRES-LOAD" "VLISP-IMPORT-EXSUBRS" "VLISP-IMPORT-SYMBOL" "VLISP-INIRES-LIST" "VLX-LOADED-P" "VMON" "VPORTS" "WCMATCH" "WHILE" "WRITE-CHAR" "WRITE-LINE" "XDROOM" "XDSIZE" "XSTRCASE" "ZEROP" "_VER" "_VL-FAST-MODE" "_VL-TIMES" "_VLISP-VERSION" "~"

(setq com-symbol-list '( ":VLR-" ":VLR-ABORTATTACH" ":VLR-ABORTDEEPCLONE" ":VLR-ABORTDXFIN" ":VLR-ABORTDXFOUT" ":VLR-ABORTINSERT" ":VLR-ABORTRESTORE" ":VLR-ABORTWBLOCK" ":VLR-ACDB-REACTOR" ":VLR-BEGINATTACH" ":VLR-BEGINCLOSE" ":VLR-BEGINDEEPCLONE" ":VLR-BEGINDEEPCLONEXLATION" ":VLR-BEGINDOUBLECLICK" ":VLR-BEGINDWGOPEN" ":VLR-BEGINDXFIN" ":VLR-BEGINDXFOUT" ":VLR-BEGININSERT" ":VLR-BEGININSERTM" ":VLR-BEGINRESTORE" ":VLR-BEGINRIGHTCLICK" ":VLR-BEGINSAVE" ":VLR-BEGINWBLOCK" ":VLR-BEGINWBLOCKID" ":VLR-BEGINWBLOCKOBJECTS" ":VLR-BEGINWBLOCKPT" ":VLR-CANCELLED" ":VLR-COMANDEERED" ":VLR-COMMAND-REACTOR" ":VLR-COMMANDCANCELLED" ":VLR-COMMANDENDED" ":VLR-COMMANDFAILED" ":VLR-COMMANDWILLSTART" ":VLR-COPIED" ":VLR-DATABASECONSTRUCTED" ":VLR-DATABASETOBEDESTROYED" ":VLR-DEEPCLONE-REACTOR" ":VLR-DOCFRAMEMOVEDORRESIZED" ":VLR-DOCMANAGER-REACTOR" ":VLR-DOCUMENTBECAMECURRENT" ":VLR-DOCUMENTCREATED" ":VLR-DOCUMENTLOCKMODECHANGED" ":VLR-DOCUMENTLOCKMODECHANGEVETOED" ":VLR-DOCUMENTLOCKMODEWILLCHANGE" ":VLR-DOCUMENTTOBEACTIVATED" ":VLR-DOCUMENTTOBEDEACTIVATED" ":VLR-DOCUMENTTOBEDESTROYED" ":VLR-DWG-REACTOR" ":VLR-DWGFILEOPENED" ":VLR-DXF-REACTOR" ":VLR-DXFINCOMPLETE" ":VLR-DXFOUTCOMPLETE" ":VLR-EDITOR-REACTOR" ":VLR-ENDATTACH" ":VLR-ENDDEEPCLONE" ":VLR-ENDDWGOPEN" ":VLR-ENDINSERT" ":VLR-ENDRESTORE"

":VLR-ENDWBLOCK" ":VLR-ERASED" ":VLR-GOODBYE" ":VLR-INSERT-REACTOR" ":VLR-LAYOUTSWITCHED" ":VLR-LINKER-REACTOR" ":VLR-LISP-REACTOR" ":VLR-LISPCANCELLED" ":VLR-LISPENDED" ":VLR-LISPWILLSTART" ":VLR-MAINFRAMEMOVEDORRESIZED" ":VLR-MISCELLANEOUS-REACTOR" ":VLR-MODIFIED" ":VLR-MODIFIEDXDATA" ":VLR-MODIFYUNDONE" ":VLR-MOUSE-REACTOR" ":VLR-OBJECT-REACTOR" ":VLR-OBJECTAPPENDED" ":VLR-OBJECTCLOSED" ":VLR-OBJECTERASED" ":VLR-OBJECTMODIFIED" ":VLR-OBJECTOPENEDFORMODIFY" ":VLR-OBJECTREAPPENDED" ":VLR-OBJECTUNAPPENDED" ":VLR-OBJECTUNERASED" ":VLR-OPENEDFORMODIFY" ":VLR-OTHERATTACH" ":VLR-OTHERINSERT" ":VLR-OTHERWBLOCK" ":VLR-PICKFIRSTMODIFIED" ":VLR-REAPPENDED" ":VLR-REDIRECTED" ":VLR-RXAPPLOADED" ":VLR-RXAPPUNLOADED" ":VLR-SAVECOMPLETE" ":VLR-SUBOBJMODIFIED" ":VLR-SYSVAR-REACTOR" ":VLR-SYSVARCHANGED" ":VLR-SYSVARWILLCHANGE" ":VLR-TOOLBAR-REACTOR" ":VLR-TOOLBARBITMAPSIZECHANGED" ":VLR-TOOLBARBITMAPSIZEWILLCHANGE" ":VLR-UNAPPENDED" ":VLR-UNDO-REACTOR" ":VLR-UNDOSUBCOMMANDAUTO" ":VLR-UNDOSUBCOMMANDBACK" ":VLR-UNDOSUBCOMMANDBEGIN" ":VLR-UNDOSUBCOMMANDCONTROL" ":VLR-UNDOSUBCOMMANDEND" ":VLR-UNDOSUBCOMMANDMARK" ":VLR-UNDOSUBCOMMANDNUMBER" ":VLR-UNERASED" ":VLR-UNKNOWNCOMMAND" ":VLR-WBLOCK-REACTOR" ":VLR-WBLOCKNOTICE" ":VLR-WINDOW-REACTOR" ":VLR-XREF-REACTOR" ":VLR-XREFSUBCOMMANDATTACHITEM" ":VLR-XREFSUBCOMMANDBINDITEM" ":VLR-XREFSUBCOMMANDDETACHITEM"

":VLR-XREFSUBCOMMANDOVERLAYITEM" ":VLR-XREFSUBCOMMANDPATHITEM" ":VLR-XREFSUBCOMMANDRELOADITEM" ":VLR-XREFSUBCOMMANDUNLOADITEM" "AC0DEGREES" "AC100_1" "AC10_1" "AC180DEGREES" "AC1FT_1FT" "AC1IN_1FT" "AC1_1" "AC1_10" "AC1_100" "AC1_128IN_1FT" "AC1_16" "AC1_16IN_1FT" "AC1_2" "AC1_20" "AC1_2IN_1FT" "AC1_30" "AC1_32IN_1FT" "AC1_4" "AC1_40" "AC1_4IN_1FT" "AC1_50" "AC1_64IN_1FT" "AC1_8" "AC1_8IN_1FT" "AC270DEGREES" "AC2_1" "AC3DFACE" "AC3DPOLYLINE" "AC3DSOLID" "AC3IN_1FT" "AC3_16IN_1FT" "AC3_32IN_1FT" "AC3_4IN_1FT" "AC3_8IN_1FT" "AC4_1" "AC6IN_1FT" "AC8_1" "AC90DEGREES" "ACABOVE" "ACACTIVEVIEWPORT" "ACALIGNMENTALIGNED" "ACALIGNMENTBOTTOMCENTER" "ACALIGNMENTBOTTOMLEFT" "ACALIGNMENTBOTTOMRIGHT" "ACALIGNMENTCENTER" "ACALIGNMENTFIT" "ACALIGNMENTLEFT" "ACALIGNMENTMIDDLE" "ACALIGNMENTMIDDLECENTER" "ACALIGNMENTMIDDLELEFT" "ACALIGNMENTMIDDLERIGHT" "ACALIGNMENTRIGHT" "ACALIGNMENTTOPCENTER" "ACALIGNMENTTOPLEFT" "ACALIGNMENTTOPRIGHT" "ACALIGNPNTACQUISITIONAUTOMATIC"

"ACALIGNPNTACQUISITIONSHIFTTOACQUIRE" "ACALLVIEWPORTS" "ACARC" "ACARCHITECTURAL" "ACARROWARCHTICK" "ACARROWBOXBLANK" "ACARROWBOXFILLED" "ACARROWCLOSED" "ACARROWCLOSEDBLANK" "ACARROWDATUMBLANK" "ACARROWDATUMFILLED" "ACARROWDEFAULT" "ACARROWDOT" "ACARROWDOTBLANK" "ACARROWDOTSMALL" "ACARROWINTEGRAL" "ACARROWNONE" "ACARROWOBLIQUE" "ACARROWOPEN" "ACARROWOPEN30" "ACARROWOPEN90" "ACARROWORIGIN" "ACARROWORIGIN2" "ACARROWSMALL" "ACARROWSONLY" "ACARROWUSERDEFINED" "ACATTACHMENTPOINTBOTTOMCENTER" "ACATTACHMENTPOINTBOTTOMLEFT" "ACATTACHMENTPOINTBOTTOMRIGHT" "ACATTACHMENTPOINTMIDDLECENTER" "ACATTACHMENTPOINTMIDDLELEFT" "ACATTACHMENTPOINTMIDDLERIGHT" "ACATTACHMENTPOINTTOPCENTER" "ACATTACHMENTPOINTTOPLEFT" "ACATTACHMENTPOINTTOPRIGHT" "ACATTRIBUTE" "ACATTRIBUTEMODECONSTANT" "ACATTRIBUTEMODEINVISIBLE" "ACATTRIBUTEMODEPRESET" "ACATTRIBUTEMODEVERIFY" "ACATTRIBUTEREFERENCE" "ACBASEMENUGROUP" "ACBESTFIT" "ACBEZIERSURFACEMESH" "ACBLOCKREFERENCE" "ACBLUE" "ACBOTTOMTOTOP" "ACBYBLOCK" "ACBYLAYER" "ACBYSTYLE" "ACCENTERLINE" "ACCENTERMARK" "ACCENTERNONE" "ACCIRCLE" "ACCUBICSPLINE3DPOLY" "ACCUBICSPLINEPOLY" "ACCUBICSURFACEMESH" "ACCYAN" "ACDECIMAL" "ACDEFAULTUNITS"

"ACDEGREEMINUTESECONDS" "ACDEGREES" "ACDEMANDLOADCMDINVOKE" "ACDEMANDLOADDISABLED" "ACDEMANDLOADENABLED" "ACDEMANDLOADENABLEDWITHCOPY" "ACDEMANDLOADONOBJECTDETECT" "ACDEMANLOADDISABLE" "ACDIAGONAL" "ACDIM3POINTANGULAR" "ACDIMALIGNED" "ACDIMANGULAR" "ACDIMARCHITECTURAL" "ACDIMARCHITECTURALSTACKED" "ACDIMDECIMAL" "ACDIMDIAMETRIC" "ACDIMENGINEERING" "ACDIMFRACTIONAL" "ACDIMFRACTIONALSTACKED" "ACDIMLARCHITECTURAL" "ACDIMLDECIMAL" "ACDIMLENGINEERING" "ACDIMLFRACTIONAL" "ACDIMLINEWITHTEXT" "ACDIMLSCIENTIFIC" "ACDIMLWINDOWSDESKTOP" "ACDIMORDINATE" "ACDIMPRECISIONEIGHT" "ACDIMPRECISIONFIVE" "ACDIMPRECISIONFOUR" "ACDIMPRECISIONONE" "ACDIMPRECISIONSEVEN" "ACDIMPRECISIONSIX" "ACDIMPRECISIONTHREE" "ACDIMPRECISIONTWO" "ACDIMPRECISIONZERO" "ACDIMRADIAL" "ACDIMROTATED" "ACDIMSCIENTIFIC" "ACDIMWINDOWSDESKTOP" "ACDISPLAY" "ACDISPLAYDCS" "ACDRAGDISPLAYAUTOMATICALLY" "ACDRAGDISPLAYONREQUEST" "ACDRAGDONOTDISPLAY" "ACELLIPSE" "ACENGINEERING" "ACENGLISH" "ACEXTENDBOTH" "ACEXTENDNONE" "ACEXTENDOTHERENTITY" "ACEXTENDTHISENTITY" "ACEXTENTS" "ACEXTERNALREFERENCE" "ACFALSE" "ACFIRSTEXTENSIONLINE" "ACFITCURVEPOLY" "ACFONTBOLD" "ACFONTBOLDITALIC" "ACFONTITALIC"

"ACFONTREGULAR" "ACFRACTIONAL" "ACFULLPREVIEW" "ACGRADS" "ACGREEN" "ACGROUP" "ACHATCH" "ACHATCHLOOPTYPEDEFAULT" "ACHATCHLOOPTYPEDERIVED" "ACHATCHLOOPTYPEEXTERNAL" "ACHATCHLOOPTYPEPOLYLINE" "ACHATCHLOOPTYPETEXTBOX" "ACHATCHPATTERNTYPECUSTOMDEFINED" "ACHATCHPATTERNTYPEPREDEFINED" "ACHATCHPATTERNTYPEUSERDEFINED" "ACHATCHSTYLEIGNORE" "ACHATCHSTYLENORMAL" "ACHATCHSTYLEOUTER" "ACHORIZONTAL" "ACHORIZONTALALIGNMENTALIGNED" "ACHORIZONTALALIGNMENTCENTER" "ACHORIZONTALALIGNMENTFIT" "ACHORIZONTALALIGNMENTLEFT" "ACHORIZONTALALIGNMENTMIDDLE" "ACHORIZONTALALIGNMENTRIGHT" "ACHORZCENTERED" "ACINCHES" "ACINSERTUNITSANGSTROMS" "ACINSERTUNITSASTRONOMICALUNITS" "ACINSERTUNITSAUTOASSIGN" "ACINSERTUNITSCENTIMETERS" "ACINSERTUNITSDECAMETERS" "ACINSERTUNITSDECIMETERS" "ACINSERTUNITSFEET" "ACINSERTUNITSGIGAMETERS" "ACINSERTUNITSHECTOMETERS" "ACINSERTUNITSINCHES" "ACINSERTUNITSKILOMETERS" "ACINSERTUNITSLIGHTYEARS" "ACINSERTUNITSMETERS" "ACINSERTUNITSMICROINCHES" "ACINSERTUNITSMICRONS" "ACINSERTUNITSMILES" "ACINSERTUNITSMILLIMETERS" "ACINSERTUNITSMILS" "ACINSERTUNITSNANOMETERS" "ACINSERTUNITSPARSECS" "ACINSERTUNITSPROMPT" "ACINSERTUNITSUNITLESS" "ACINSERTUNITSYARDS" "ACINTERSECTION" "ACJIS" "ACKEYBOARDENTRY" "ACKEYBOARDENTRYEXCEPTSCRIPTS" "ACKEYBOARDRUNNINGOBJSNAP" "ACLAYOUT" "ACLEADER" "ACLEFTTORIGHT" "ACLIMITS" "ACLINE"

"ACLINENOARROW" "ACLINESPACINGSTYLEATLEAST" "ACLINESPACINGSTYLEEXACTLY" "ACLINEWITHARROW" "ACLNWT000" "ACLNWT005" "ACLNWT009" "ACLNWT013" "ACLNWT015" "ACLNWT018" "ACLNWT020" "ACLNWT025" "ACLNWT030" "ACLNWT035" "ACLNWT040" "ACLNWT050" "ACLNWT053" "ACLNWT060" "ACLNWT070" "ACLNWT080" "ACLNWT090" "ACLNWT100" "ACLNWT106" "ACLNWT120" "ACLNWT140" "ACLNWT158" "ACLNWT200" "ACLNWT211" "ACLNWTBYBLOCK" "ACLNWTBYLAYER" "ACLNWTBYLWDEFAULT" "ACMAGENTA" "ACMAX" "ACMENUFILECOMPILED" "ACMENUFILESOURCE" "ACMENUITEM" "ACMENUSEPARATOR" "ACMENUSUBMENU" "ACMETRIC" "ACMILLIMETERS" "ACMIN" "ACMINSERTBLOCK" "ACMLINE" "ACMODELSPACE" "ACMOVETEXTADDLEADER" "ACMOVETEXTNOLEADER" "ACMTEXT" "ACNATIVE" "ACNORM" "ACNOTSTACKED" "ACOFF" "ACON" "ACOQGRAPHICS" "ACOQHIGHPHOTO" "ACOQLINEART" "ACOQPHOTO" "ACOQTEXT" "ACOUTSIDE" "ACOVERFIRSTEXTENSION" "ACOVERSECONDEXTENSION"

"ACPALETTEBYDRAWING" "ACPALETTEBYSESSION" "ACPAPERSPACE" "ACPAPERSPACEDCS" "ACPARTIALMENUGROUP" "ACPARTIALPREVIEW" "ACPENWIDTH013" "ACPENWIDTH018" "ACPENWIDTH025" "ACPENWIDTH035" "ACPENWIDTH050" "ACPENWIDTH070" "ACPENWIDTH100" "ACPENWIDTH140" "ACPENWIDTH200" "ACPENWIDTHUNK" "ACPIXELS" "ACPLOTORIENTATIONLANDSCAPE" "ACPLOTORIENTATIONPORTRAIT" "ACPOINT" "ACPOLICYLEGACYDEFAULT" "ACPOLICYLEGACYLEGACY" "ACPOLICYLEGACYQUERY" "ACPOLICYNEWDEFAULT" "ACPOLICYNEWLEGACY" "ACPOLYFACEMESH" "ACPOLYLINE" "ACPOLYLINELIGHT" "ACPOLYMESH" "ACPREFERENCECLASSIC" "ACPREFERENCECUSTOM" "ACPRINTERALERTONCE" "ACPRINTERALWAYSALERT" "ACPRINTERNEVERALERT" "ACPRINTERNEVERALERTLOGONCE" "ACPROXYBOUNDINGBOX" "ACPROXYNOTSHOW" "ACPROXYSHOW" "ACPVIEWPORT" "ACQUADSPLINE3DPOLY" "ACQUADSPLINEPOLY" "ACQUADSURFACEMESH" "ACR12_DXF" "ACR13_DWG" "ACR13_DXF" "ACR14_DWG" "ACR14_DXF" "ACR15_DWG" "ACR15_DXF" "ACR15_TEMPLATE" "ACRADIANS" "ACRASTER" "ACRAY" "ACRED" "ACREGION" "ACRIGHTTOLEFT" "ACSCALETOFIT" "ACSCIENTIFIC" "ACSECONDEXTENSIONLINE" "ACSELECTIONSETALL"

"ACSELECTIONSETCROSSING" "ACSELECTIONSETCROSSINGPOLYGON" "ACSELECTIONSETFENCE" "ACSELECTIONSETLAST" "ACSELECTIONSETPREVIOUS" "ACSELECTIONSETWINDOW" "ACSELECTIONSETWINDOWPOLYGON" "ACSHAPE" "ACSIMPLE3DPOLY" "ACSIMPLEMESH" "ACSIMPLEPOLY" "ACSOLID" "ACSPLINE" "ACSPLINENOARROW" "ACSPLINEWITHARROW" "ACSUBTRACTION" "ACTEXT" "ACTEXTANDARROWS" "ACTEXTFLAGBACKWARD" "ACTEXTFLAGUPSIDEDOWN" "ACTEXTONLY" "ACTOLBASIC" "ACTOLBOTTOM" "ACTOLDEVIATION" "ACTOLERANCE" "ACTOLLIMITS" "ACTOLMIDDLE" "ACTOLNONE" "ACTOLSYMMETRICAL" "ACTOLTOP" "ACTOOLBARBUTTON" "ACTOOLBARCONTROL" "ACTOOLBARDOCKBOTTOM" "ACTOOLBARDOCKLEFT" "ACTOOLBARDOCKRIGHT" "ACTOOLBARDOCKTOP" "ACTOOLBARFLOATING" "ACTOOLBARFLYOUT" "ACTOOLBARSEPARATOR" "ACTOPTOBOTTOM" "ACTRACE" "ACTRUE" "ACUCS" "ACUNION" "ACUNKNOWN" "ACVERTCENTERED" "ACVERTICALALIGNMENTBASELINE" "ACVERTICALALIGNMENTBOTTOM" "ACVERTICALALIGNMENTMIDDLE" "ACVERTICALALIGNMENTTOP" "ACVIEW" "ACVIEWPORT2HORIZONTAL" "ACVIEWPORT2VERTICAL" "ACVIEWPORT3ABOVE" "ACVIEWPORT3BELOW" "ACVIEWPORT3HORIZONTAL" "ACVIEWPORT3LEFT" "ACVIEWPORT3RIGHT" "ACVIEWPORT3VERTICAL" "ACVIEWPORT4"

"ACVP100_1" "ACVP10_1" "ACVP1FT_1FT" "ACVP1IN_1FT" "ACVP1_1" "ACVP1_10" "ACVP1_100" "ACVP1_128IN_1FT" "ACVP1_16" "ACVP1_16IN_1FT" "ACVP1_2" "ACVP1_20" "ACVP1_2IN_1FT" "ACVP1_30" "ACVP1_32IN_1FT" "ACVP1_4" "ACVP1_40" "ACVP1_4IN_1FT" "ACVP1_50" "ACVP1_64IN_1FT" "ACVP1_8" "ACVP1_8IN_1FT" "ACVP2_1" "ACVP3IN_1FT" "ACVP3_16IN_1FT" "ACVP3_32IN_1FT" "ACVP3_4IN_1FT" "ACVP3_8IN_1FT" "ACVP4_1" "ACVP6IN_1FT" "ACVP8_1" "ACVPCUSTOMSCALE" "ACVPSCALETOFIT" "ACWHITE" "ACWINDOW" "ACWORLD" "ACXLINE" "ACYELLOW" "ACZOOMSCALEDABSOLUTE" "ACZOOMSCALEDRELATIVE" "ACZOOMSCALEDRELATIVEPSPACE" "SAFEARRAY" "SAFEARRAY-GET-DIM" "SAFEARRAY-GET-ELEMENT" "SAFEARRAY-GET-L-BOUND" "SAFEARRAY-GET-U-BOUND" "SAFEARRAY-PUT-ELEMENT" "SAFEARRAY-TYPE" "SAFEARRAY-VALUE" "VARIANT" "VARIANT-TYPE" "VARIANT-VALUE" "VLA-ACTIVATE" "VLA-ADD" "VLA-ADD3DFACE" "VLA-ADD3DMESH" "VLA-ADD3DPOLY" "VLA-ADDARC" "VLA-ADDATTRIBUTE" "VLA-ADDBOX"

"VLA-ADDCIRCLE" "VLA-ADDCONE" "VLA-ADDCUSTOMOBJECT" "VLA-ADDCYLINDER" "VLA-ADDDIM3POINTANGULAR" "VLA-ADDDIMALIGNED" "VLA-ADDDIMANGULAR" "VLA-ADDDIMDIAMETRIC" "VLA-ADDDIMORDINATE" "VLA-ADDDIMRADIAL" "VLA-ADDDIMROTATED" "VLA-ADDELLIPSE" "VLA-ADDELLIPTICALCONE" "VLA-ADDELLIPTICALCYLINDER" "VLA-ADDEXTRUDEDSOLID" "VLA-ADDEXTRUDEDSOLIDALONGPATH" "VLA-ADDFITPOINT" "VLA-ADDHATCH" "VLA-ADDITEMS" "VLA-ADDLEADER" "VLA-ADDLIGHTWEIGHTPOLYLINE" "VLA-ADDLINE" "VLA-ADDMENUITEM" "VLA-ADDMINSERTBLOCK" "VLA-ADDMLINE" "VLA-ADDMTEXT" "VLA-ADDOBJECT" "VLA-ADDPOINT" "VLA-ADDPOLYFACEMESH" "VLA-ADDPOLYLINE" "VLA-ADDPVIEWPORT" "VLA-ADDRASTER" "VLA-ADDRAY" "VLA-ADDREGION" "VLA-ADDREVOLVEDSOLID" "VLA-ADDSEPARATOR" "VLA-ADDSHAPE" "VLA-ADDSOLID" "VLA-ADDSPHERE" "VLA-ADDSPLINE" "VLA-ADDSUBMENU" "VLA-ADDTEXT" "VLA-ADDTOLERANCE" "VLA-ADDTOOLBARBUTTON" "VLA-ADDTORUS" "VLA-ADDTRACE" "VLA-ADDVERTEX"