; Interface Functions (defun c:BEI_Cloud_OnInitialize ( /) (dcl_MessageBox "To Do: code must be added to event handler\r\nc:BEI_Cloud_OnInitialize" "To do") ) (defun c:CLOUD_Help_OnClicked ( /) (dcl_MessageBox "To Do: code must be added to event handler\r\nc:CLOUD_Help_OnClicked" "To do") ) (defun c:Cloud_TB_OnClicked ( /) (dcl_MessageBox "To Do: code must be added to event handler\r\nc:Cloud_TB_OnClicked" "To do") ) (defun c:CLOUD_Arch_OnClicked ( /) (dcl_MessageBox "To Do: code must be added to event handler\r\nc:CLOUD_Arch_OnClicked" "To do") ) (defun c:CLOUD_Rect_OnClicked () (bei_ds) (PROMPT "\nMake a rectangle around the area where you want a revcloud: ") (SETQ P1 (GETPOINT "\nFirst point of rectangle: ")) (SETQ P2 (GETCORNER P1 "\nSecond point of rectangle: ")) (setq bei_command "._rectang") (command "._rectang" P1 P2) (setq l2 (entlast)) (beidelta) (beicend) ) (defun c:CLOUD_ConvOB_OnClicked ( /) (bei_ds) (setq l2 (entsel "\nSelect the entity that you wish to turn into a Revision Cloud: ")) (if (NULL l2); Make sure an object was selected (while (NULL l2) (princ "\nYou did not select an object, please try again or press ^C to quit: ") (setq l2 (entsel)) ); While ) (beidelta) (bei_cend) ) (defun c:CLOUD_DrawOB_OnClicked ( /) (bei_ds) (setq pt1 (getpoint "\nPlease select the first point for the object: ")) (setq origpt1 pt1) (command "._pline" pt1) (while pt1 (initget "Close _Close") (setq pt1 (getpoint "\nPlease select the next point for the object (Close): ")) (command pt1) ) (setq l2 (entlast)) (beidelta) (bei_cend) ) ;End of interface functions ;Supporting Functions (defun bei_cend () (COMMAND "._REVCLOUD" "A" mna mxa "Object" l2 "" ) (setq el (entlast)) (command "pedit" el "width" ds2 "" ) ) (defun bei_ds () (if (or (= (getvar "tilemode") 1) (/= (getvar "cvport") 1)) (progn (setq ds (getvar "dimscale" )) ) ) (if (and (= (getvar "tilemode") 0) (= (getvar "cvport") 1)) (progn (setq ds 1.1) ) ) (setq dmna (/ ds 2)) (setq dmns (rtos dmna)) (SETQ mna (* ds 0.35)) (setq mxa (* ds 0.35)) (setq ds2 (/ ds 48)) ) (defun bei_layer () (setq delta (dcl_control_gettext Cloud_Delta)) (setq DeltaLayer (strcat "DELTA-" delta)) (setq CloudLayer (strcat "CLOUD-" delta)) (IF (= (GETVAR "PSTYLEMODE") 0) (PROGN ; If this is a drawing that uses named based plotting, then set the layers accordingly (if (AND (= (dos_strmatch (getvar "dwgprefix") "*151*") T) (= (dos_strmatch (getvar "dwgprefix") "*04-001*") T)) (command ".-layer" "NEW" CloudLayer "Color" "8" CloudLayer "Lweight" "0.005" CloudLayer "Make" "CLOUD" "PS" "BLACK" CloudLayer "" ); If this is Bridge Street, then make the clouds black. (command ".-layer" "NEW" CloudLayer "Color" "8" CloudLayer "Lweight" "0.005" CloudLayer "Make" "CLOUD" "PS" "CLOUD" CloudLayer "" ); If it is not, then make the clouds shaded ) (command ".-layer" "NEW" DeltaLayer "Color" "7" DeltaLayer "Lweight" "Default" DeltaLayer "PS" "Black" DeltaLayer "" ); Create the delta layer ) (progn ; If this is a drawing that uses color based plotting, then set the layers accordingly (command ".-layer" "NEW" CloudLayer "Color" "8" CloudLayer "Lweight" "0.005" CloudLayer "Make" CloudLayer "" ); Create the Cloud layer (command ".-layer" "NEW" DeltaLayer "Color" "7" DeltaLayer "Lweight" "Default" DeltaLayer "" ); Create the delta layer ) ) ) (defun beidelta () (command "._-layer" "m" DeltaLayer "") (setq ip (getpoint (strcat "\nPlease select a point to insert the delta symbol at (Press enter or pick a blank spot for none): "))) (setq ip2 (osnap ip "_nea")) (if ip2 (progn (command "attreq" "1") (if (or (= (getvar "tilemode") 1) (/= (getvar "cvport") 1)) (progn (setq a324 (strcat "@" (rtos (* 0.25362901 (getvar "dimscale"))) "<90")) (command "polygon" "3" ip2 "I" a324) (setq dtemp (entlast)) (command "._trim" dtemp "" ip2 "") (command "._erase" dtemp "") (command ".-insert" "BEIDelta-Rev1" ip2 (getvar "dimscale") (getvar "dimscale") "0" Delta) ) ) (if (and (= (getvar "tilemode") 0) (= (getvar "cvport") 1)) (progn (command "polygon" "3" ip2 "I" "@0.25362901<90") (setq dtemp (entlast)) (command "._trim" dtemp "" ip2 "") (command "._erase" dtemp "") (command ".-insert" "BEIDelta-Rev2" ip2 "1" "1" "0" Delta) ) ) ) ) (bei_psmode) ) ;End of supporting functions ;Main Function (defun C:RTOOLS () ; This loads the project as a toll palette. (or LoadRunTime (load "_OpenDclUtils.lsp") (exit)) (LoadRunTime) (LoadODCLProj "rtools.odcl") (dcl_Form_Show BEI_Cloud) ) ;End of main function