Author Topic: building an XREF preparation for client files  (Read 1919 times)

0 Members and 1 Guest are viewing this topic.

KewlToyZ

  • Guest
building an XREF preparation for client files
« on: November 30, 2007, 06:24:03 PM »
I'm trying to nail a few more items down.
I wondered how I would set layers using wildcards that match *pat* and *hat* to color 19?

What I have so far is all to color 8 and defpoints to color 7 but I wanted finish it out with a tweak for the sake of presentation.

So far I have:
Code: [Select]
(DEFUN c:mkxref()
;==========================================================================================================================================Turn on command line responses
;(setvar "CMDECHO" 0); DO NOT CHANGE THIS LINE
;==========================================================================================================================================
(command "rememberfolders" "1")
(command "TILEMODE" 1)
(command "Zoom" "Extents")
;(command "qsave")
(princ "\nObjects in audit phase. Please be patient......")
(command "audit" "y")
;(command "qsave")
(command "purge" "all" "*" "n")
(command "purge" "all" "*" "n")
(command "purge" "all" "*" "n")
;(command "qsave")   
(princ)
; -----------------------------------------------Audit and Purge Completed
; -----------------------------------------------Delete Page Setups & Set Plot Style to KTA.ctb
(vl-load-com)
  (vlax-for ps (vla-get-plotconfigurations
  (vla-get-activedocument
  (vlax-get-acad-object)))
  (vla-delete ps)
)
(princ "\nPlot style set to kta.ctb!")
(princ)

(vlax-for lo (vla-get-Layouts (vla-get-ActiveDocument (vlax-get-Acad-Object)))
  (if (/= (vla-get-Name lo) "Model")
    (vla-Delete lo)
  )
)
(princ "\nAll Layouts Deleted!")
(princ)
; -----------------------------------------------Layouts Deleted

;==========================================================================================================================================
(prompt "\nSetting All 3-D Items to zero height in Z-Axis!!")
(defun c:z-zero (/ a ss len e o10 l10 n10 f o11 l11 n11 o39 n39)
  ;(setup)
  (setq a 0)
  (princ
    "\nChanges entities' z-coordinate to 0 (2D from 3D)."
  )
  ;(setq ss (ssget))
  (setq ss (ssget "_X" ))
  (setq len (sslength ss))
  (repeat len
    (setq e (entget (ssname ss a)))
    (setq o10 (assoc 10 e))
    (setq l10 (list (cadr (assoc 10 e)) (caddr (assoc 10 e)) 0.0))
    (setq n10 (cons 10 l10))
    (setq f (subst n10 o10 e))
    (entmod f)
    (setq a (1+ a))
  ) ;end repeat
  (setq a 0)
  (repeat len
    (setq e (entget (ssname ss a)))
    (setq o11 (assoc 11 e))
    (setq l11 (list (cadr (assoc 11 e)) (caddr (assoc 11 e)) 0.0))
    (setq n11 (cons 11 l11))
    (setq f (subst n11 o11 e))
    (entmod f)
    (setq a (1+ a))
  ) ;end repeat
  (setq a 0)
  (repeat len
    (setq e (entget (ssname ss a)))
    (setq o39 (assoc 39 e))
    (setq n39 (cons 39 0))
    (setq f (subst n39 o39 e))
    (entmod f)
    (setq a (1+ a))
  ) ;end repeat
  ;(end)
)
;==========================================================================================================================================

(c:z-zero)
(princ "\nStandard KTA drawing variables initiated!!")
(command "-style" "Standard" "archquik.shx" "0" "1" "0" "No" "No")
(princ "\nArchquik.shx is the Standard font!")
(princ)
;==========================================================================================================================================Control Line Scaling
(command "PSLTSCALE" 0)
(command "MSLTSCALE" 0)
;==========================================================================================================================================
(princ "\nMSpace & PSpace LTScale Varaibles set to 0!!
Defaults to LTSCALE settings now!")
(princ)


;==========================================================================================================================================Remove Annotation Scales
(princ "\nAnnotation Scales Reset!!!!!!
\n")
(princ)
(command "-scalelistedit" "Reset" "Yes" "Exit")
;==========================================================================================================================================


;=====================================================================================
(command "OLEQUALITY" 0) ; Sets OLE object (like Excel Files) to print monochrome
(command "PROXYNOTICE" 0) ; disables proxy graphics warning notice
(command "dctmain" "enu")
(command "fontalt" "archquik.shx")
(command "TEXTFILL" 1)
(command "MIRRTEXT" 0)
(command "PDMODE" 1)
(command "OLEQUALITY" 0) ; Sets OLE object (like Excel Files) to print monochrome
(command "rememberfolders" 1) ; Sets the previous folder to open with each dialog
(command "coords" 2)
(command "ACADLSPASDOC" 1)
(command "PUBLISHCOLLATE" 0)
(command "PUBLISHALLSHEETS" 0)
(command "pickstyle" 0)
(command "savefilepath" "C:\\_KTA MEP\\Autosave")
(command "savetime" 15)
(command "sigwarn" 0)
(command "imageframe" 2)
(command "VISRETAIN" 1)
(command "ATTDIA" 1)
(command "SDI" 0)
(command "FILEDIA" 1)
(command "CMDDIA" 1)
(COMMAND "REGENAUTO" "ON")
(command "recoverymode" 0)
(command "drawingrecoveryhide")
(command "PROXYNOTICE" 0) ; disables proxy graphics warning notice
(command "STANDARDSVIOLATION" 0) ; disables standards warning notice
(command "GRID" "OFF")
(command "TRACKPATH" 0)
;==========================================================================================================================================
(princ "\nDialog Control Variables set!!")
(princ)

;==========================================================================================================================================Layer Control Handling
(command "LAYEREVAL" 0) ; turns off XREF layer warning controls
(command "LAYERNOTIFY" 0) ; turns off unreconciled layer warning controls
(command "LAYLOCKFADECTL" 0) ; adjusts layer locked fade controls
;==========================================================================================================================================
(princ "\nLayer Handling variables set!!")
(princ)

;==========================================================================================================================================Control XREF Handling
; speeds up network traffic by building local copies.
; Creates XREF copies to lock instead of locking people out of the XREF files themselves.
(command "XLOADCTL" 2)
;==========================================================================================================================================
(princ "\nXREF Handling variables set!!")
(princ)

;==========================================================================================================================================Set Units
(command "-units" "4" "64" "1" "4" "0" "N") ;;;caused command line window to pop up
;==========================================================================================================================================
(princ "\nStandard KTA drawing units set to Inches!!")
(princ)


;==========================================================================================================================================Set Dimension Variables
(command "INSUNITS" 1)
(command "insunitsdefsource" 1)
(command "dimassoc" 2)
(command "DIMASO"      "Off") ; Create dimension objects
(command "DIMADEC"     0) ;                 Angular decimal places
(command "DIMALT"      "Off") ;             Alternate units selected
(command "DIMALTD"     2) ;                 Alternate unit decimal places
(command "DIMALTF"     25.40000) ;          Alternate unit scale factor
(command "DIMALTRND"   0) ;                 Alternate units rounding value
(command "DIMALTTD"    2) ;                 Alternate tolerance decimal places
(command "DIMALTTZ"    0) ;                 Alternate tolerance zero suppression
(command "DIMALTU"     2) ;                 Alternate units
(command "DIMALTZ"     0) ;                 Alternate unit zero suppression
(command "DIMAPOST"    ".") ;               Prefix and suffix for alternate text
(command "DIMARCSYM"   0) ;                 Arc length symbol
(command "DIMASZ"      "1/8") ;             Arrow size
(command "DIMATFIT"    3) ;                 Arrow and text fit
(command "DIMAUNIT"    0) ;                 Angular unit format
(command "DIMAZIN"     0) ;                 Angular zero supression
(command "DIMBLK"      ".") ;               Arrow block name
(command "DIMBLK1"     ".") ;               First arrow block name
(command "DIMBLK2"     ".") ;               Second arrow block name
(command "DIMCEN"      0) ;                 Center mark size
(command "DIMCLRD"     1) ;                 Dimension line and leader color
(command "DIMCLRE"     1) ;                 Extension line color
(command "DIMCLRT"     7) ;                 Dimension text color
(command "DIMDEC"      4) ;                 Decimal places
(command "DIMDLE"      0) ;                 Dimension line extension
(command "DIMDLI"      "3/8") ;             Dimension line spacing
(command "DIMDSEP"     ".") ;               Decimal separator
(command "DIMEXE"      "3/16") ;            Extension above dimension line
(command "DIMEXO"      "1/16") ;            Extension line origin offset
(command "DIMFRAC"     0) ;                 Fraction format
(command "DIMFXL"      1) ;                 Fixed Extension Line
(command "DIMFXLON"    "Off") ;             Enable Fixed Extension Line
(command "DIMGAP"      "3/32") ;            Gap from dimension line to text
(command "DIMJOGANG"   45.00) ;             Radius dimension jog angle
(command "DIMJUST"     0) ;                 Justification of text on dimension line
(command "DIMLDRBLK"   ".") ;               Leader block name
(command "DIMLFAC"     1.00000) ;           Linear unit scale factor
(command "DIMLIM"      "Off") ;             Generate dimension limits
(command "DIMLTEX1"    "BYBLOCK") ;         Linetype extension line 1
(command "DIMLTEX2"    "BYBLOCK") ;         Linetype extension line 2
(command "DIMLTYPE"    "BYBLOCK") ;         Dimension linetype
(command "DIMLUNIT"    4) ;                 Linear unit format
(command "DIMLWD"      -2) ;                Dimension line and leader lineweight
(command "DIMLWE"      -2) ;                Extension line lineweight
(command "DIMPOST"     ".") ;               Prefix and suffix for dimension text
(command "DIMRND"      0) ;                 Rounding value
(command "DIMSAH"      "Off") ;             Separate arrow blocks
(command "DIMSD1"      "Off") ;             Suppress the first dimension line
(command "DIMSD2"      "Off") ;             Suppress the second dimension line
(command "DIMSE1"      "Off") ;             Suppress the first extension line
(command "DIMSE2"      "Off") ;             Suppress the second extension line
(command "DIMSOXD"     "Off") ;             Suppress outside dimension lines
(command "DIMTAD"      0) ;                 Place text above the dimension line
(command "DIMTDEC"     4) ;                 Tolerance decimal places
(command "DIMTFAC"     1.00000) ;           Tolerance text height scaling factor
(command "DIMTFILL"    0) ;                 Text background enabled
(command "DIMTFILLCLR" 0) ;                 Text background color
(command "DIMTIH"      "On") ;              Text inside extensions is horizontal
(command "DIMTIX"      "Off") ;             Place text inside extensions
(command "DIMTM"       0) ;                 Minus tolerance
(command "DIMTMOVE"    0) ;                 Text movement
(command "DIMTOFL"     "Off") ;             Force line inside extension lines
(command "DIMTOH"      "On") ;              Text outside horizontal
(command "DIMTOL"      "Off") ;             Tolerance dimensioning
(command "DIMTOLJ"     1) ;                 Tolerance vertical justification
(command "DIMTP"       0) ;                 Plus tolerance
(command "DIMTSZ"      0) ;                 Tick size
(command "DIMTVP"      0.00000) ;           Text vertical position
(command "DIMTXSTY"    "Standard") ;        Text style
(command "DIMTXT"      "3/32") ;            Text height
(command "DIMTZIN"     0) ;                 Tolerance zero suppression
(command "DIMUPT"      "Off") ;             User positioned text
(command "DIMZIN"      3) ;                 Zero suppression

  ;==========================================================================================================================================Layer setups for backgrounds
  (prompt "\nThawing and Showing all layers.")
  (command "layer" "t" "*" "on" "*" "u" "*" "")
  (command "regen" "")
  (prompt "\nUnlocking all layers!")
  (command "layer" "unlock" "*" "")
  (prompt "\nAll Layers Made Color 8 with Defpoints White!")
  (command "-layer" "s" "0" "")
  (command "-layer" "t" "*" "")
  (command "-layer" "u" "*" "")
  (command "setbylayer" "all" "" "yes" "yes")
  (command "chprop" "all" "" "c" "bylayer" "")
  (command "_.layer" "c" "8" "*" "")
  (command "_.layer" "c" "8" "0" "")
  (command "_.layer" "c" "7" "DEFPOINTS" "")
  (command "regenall")
  ;==========================================================================================================================================
  ;(c:mkbylayer)
  ;(command "chprop" "all" "" "c" "bylayer" "")
  ;(command "_.layer" "c" "8" "*" "")
  ;(command "regenall")
    (princ "\nAEC Objects will be removed.
  XREF's will be bound due to nesting of AEC objects.
  You will find your file with the Zbase- suffix in the filename.
Press Enter to continue....")
  (command "-exporttoautocad")
  ;(command "Suffix")
  ;(command "-Zbase")
  (command "Prefix")
  (command "Zbase-")
  (command "Bind")
  (command "Yes" "" "")
  (princ "\nAEC Objects have been removed in the drawing with 'Zbase-Filename.dwg' in the name.") 
  ;(command "close" "y") 
  ;==========================================================================================================================================Turn on command line responses
  ;(setvar "CMDECHO" 1); DO NOT CHANGE THIS LINE
  ;==========================================================================================================================================
  (princ)
)

KewlToyZ

  • Guest
Re: building an XREF preparation for client files
« Reply #1 on: November 30, 2007, 06:30:41 PM »
so far basics look fairly easy, now just to add to the list of types I need:

Code: [Select]
Command: -layer

Current layer:  "0"
Enter an option
[?/Make/Set/New/ON/OFF/Color/Ltype/LWeight/MATerial/Plot/Freeze/Thaw/LOck/Unlock
/stAte]: color

New color [Truecolor/COlorbook] : 19

Enter name list of layer(s) for color 19 <0>: *pat*
Enter an option
[?/Make/Set/New/ON/OFF/Color/Ltype/LWeight/MATerial/Plot/Freeze/Thaw/LOck/Unlock
/stAte]: c

New color [Truecolor/COlorbook] : 19

Enter name list of layer(s) for color 19 <0>: *hat*

No matching layer names found.
Enter an option
[?/Make/Set/New/ON/OFF/Color/Ltype/LWeight/MATerial/Plot/Freeze/Thaw/LOck/Unlock
/stAte]:

Command: regen
Regenerating model.

Command: '_layer Duplicate definition of block _ArchTick  ignored.

KewlToyZ

  • Guest
Re: building an XREF preparation for client files
« Reply #2 on: November 30, 2007, 08:01:09 PM »
Version 2

Code: [Select]
(DEFUN c:mkxref()
;==========================================================================================================================================Turn on command line responses
(setvar "CMDECHO" 0); DO NOT CHANGE THIS LINE
;==========================================================================================================================================
(command "rememberfolders" "1")
(command "TILEMODE" 1)
(command "Zoom" "Extents")
;(command "qsave")
(princ "\nObjects in audit phase. Please be patient......")
(command "audit" "y")
;(command "qsave")
(command "purge" "all" "*" "n")
(command "purge" "all" "*" "n")
(command "purge" "all" "*" "n")
;(command "qsave")   
(princ)
; -----------------------------------------------Audit and Purge Completed
; -----------------------------------------------Delete Page Setups & Set Plot Style to KTA.ctb
(vl-load-com)
  (vlax-for ps (vla-get-plotconfigurations
  (vla-get-activedocument
  (vlax-get-acad-object)))
  (vla-delete ps)
)
(princ "\nPlot style set to kta.ctb!
\n")
(princ)

(vlax-for lo (vla-get-Layouts (vla-get-ActiveDocument (vlax-get-Acad-Object)))
  (if (/= (vla-get-Name lo) "Model")
    (vla-Delete lo)
  )
)
(princ "\nAll Layouts Deleted!")
(princ)
; -----------------------------------------------Layouts Deleted

;==========================================================================================================================================
(prompt "\nSetting All 3-D Items to zero height in Z-Axis!!! ---Please be patient---")
(defun c:z-zero (/ a ss len e o10 l10 n10 f o11 l11 n11 o39 n39)
  ;(setup)
  (setq a 0)
  (princ
    "\nChanges entities' z-coordinate to 0 (2D from 3D)."
  )
  ;(setq ss (ssget))
  (setq ss (ssget "_X" ))
  (setq len (sslength ss))
  (repeat len
    (setq e (entget (ssname ss a)))
    (setq o10 (assoc 10 e))
    (setq l10 (list (cadr (assoc 10 e)) (caddr (assoc 10 e)) 0.0))
    (setq n10 (cons 10 l10))
    (setq f (subst n10 o10 e))
    (entmod f)
    (setq a (1+ a))
  ) ;end repeat
  (setq a 0)
  (repeat len
    (setq e (entget (ssname ss a)))
    (setq o11 (assoc 11 e))
    (setq l11 (list (cadr (assoc 11 e)) (caddr (assoc 11 e)) 0.0))
    (setq n11 (cons 11 l11))
    (setq f (subst n11 o11 e))
    (entmod f)
    (setq a (1+ a))
  ) ;end repeat
  (setq a 0)
  (repeat len
    (setq e (entget (ssname ss a)))
    (setq o39 (assoc 39 e))
    (setq n39 (cons 39 0))
    (setq f (subst n39 o39 e))
    (entmod f)
    (setq a (1+ a))
  ) ;end repeat
  ;(end)
)
;==========================================================================================================================================

(c:z-zero)
(princ "\nStandard KTA drawing variables initiated!!")
(command "-style" "Standard" "archquik.shx" "0" "1" "0" "No" "No")
(princ "\nArchquik.shx is the Standard font!")
(princ)
;==========================================================================================================================================Control Line Scaling
(command "PSLTSCALE" 0)
(command "MSLTSCALE" 0)
;==========================================================================================================================================
(princ "\nMSpace & PSpace LTScale Varaibles set to 0!!
Defaults to LTSCALE settings now!")
(princ)


;==========================================================================================================================================Remove Annotation Scales
(princ "\nAnnotation Scales Reset!!!!!!
\n")
(princ)
(command "-scalelistedit" "Reset" "Yes" "Exit")
;==========================================================================================================================================


;=====================================================================================
(command "OLEQUALITY" 0) ; Sets OLE object (like Excel Files) to print monochrome
(command "PROXYNOTICE" 0) ; disables proxy graphics warning notice
(command "dctmain" "enu")
(command "fontalt" "archquik.shx")
(command "TEXTFILL" 1)
(command "MIRRTEXT" 0)
(command "PDMODE" 1)
(command "OLEQUALITY" 0) ; Sets OLE object (like Excel Files) to print monochrome
(command "rememberfolders" 1) ; Sets the previous folder to open with each dialog
(command "coords" 2)
(command "ACADLSPASDOC" 1)
(command "PUBLISHCOLLATE" 0)
(command "PUBLISHALLSHEETS" 0)
(command "pickstyle" 0)
(command "savefilepath" "C:\\_KTA MEP\\Autosave")
(command "savetime" 15)
(command "sigwarn" 0)
(command "imageframe" 2)
(command "VISRETAIN" 1)
(command "ATTDIA" 1)
(command "SDI" 0)
(command "FILEDIA" 1)
(command "CMDDIA" 1)
(COMMAND "REGENAUTO" "ON")
(command "recoverymode" 0)
(command "drawingrecoveryhide")
(command "PROXYNOTICE" 0) ; disables proxy graphics warning notice
(command "STANDARDSVIOLATION" 0) ; disables standards warning notice
(command "GRID" "OFF")
(command "TRACKPATH" 0)
;==========================================================================================================================================
(princ "\nDialog Control Variables set!!")
(princ)

;==========================================================================================================================================Layer Control Handling
(command "LAYEREVAL" 0) ; turns off XREF layer warning controls
(command "LAYERNOTIFY" 0) ; turns off unreconciled layer warning controls
(command "LAYLOCKFADECTL" 0) ; adjusts layer locked fade controls
;==========================================================================================================================================
(princ "\nLayer Handling variables set!!")
(princ)

;==========================================================================================================================================Control XREF Handling
; speeds up network traffic by building local copies.
; Creates XREF copies to lock instead of locking people out of the XREF files themselves.
(command "XLOADCTL" 2)
;==========================================================================================================================================
(princ "\nXREF Handling variables set!!")
(princ)

;==========================================================================================================================================Set Units
(command "-units" "4" "64" "1" "4" "0" "N") ;;;caused command line window to pop up
;==========================================================================================================================================
(princ "\nStandard KTA drawing units set to Inches!!")
(princ)


;==========================================================================================================================================Set Dimension Variables
(command "INSUNITS" 1)
(command "insunitsdefsource" 1)
(command "dimassoc" 2)
(command "DIMASO"      "Off") ; Create dimension objects
(command "DIMADEC"     0) ;                 Angular decimal places
(command "DIMALT"      "Off") ;             Alternate units selected
(command "DIMALTD"     2) ;                 Alternate unit decimal places
(command "DIMALTF"     25.40000) ;          Alternate unit scale factor
(command "DIMALTRND"   0) ;                 Alternate units rounding value
(command "DIMALTTD"    2) ;                 Alternate tolerance decimal places
(command "DIMALTTZ"    0) ;                 Alternate tolerance zero suppression
(command "DIMALTU"     2) ;                 Alternate units
(command "DIMALTZ"     0) ;                 Alternate unit zero suppression
(command "DIMAPOST"    ".") ;               Prefix and suffix for alternate text
(command "DIMARCSYM"   0) ;                 Arc length symbol
(command "DIMASZ"      "1/8") ;             Arrow size
(command "DIMATFIT"    3) ;                 Arrow and text fit
(command "DIMAUNIT"    0) ;                 Angular unit format
(command "DIMAZIN"     0) ;                 Angular zero supression
(command "DIMBLK"      ".") ;               Arrow block name
(command "DIMBLK1"     ".") ;               First arrow block name
(command "DIMBLK2"     ".") ;               Second arrow block name
(command "DIMCEN"      0) ;                 Center mark size
(command "DIMCLRD"     1) ;                 Dimension line and leader color
(command "DIMCLRE"     1) ;                 Extension line color
(command "DIMCLRT"     7) ;                 Dimension text color
(command "DIMDEC"      4) ;                 Decimal places
(command "DIMDLE"      0) ;                 Dimension line extension
(command "DIMDLI"      "3/8") ;             Dimension line spacing
(command "DIMDSEP"     ".") ;               Decimal separator
(command "DIMEXE"      "3/16") ;            Extension above dimension line
(command "DIMEXO"      "1/16") ;            Extension line origin offset
(command "DIMFRAC"     0) ;                 Fraction format
(command "DIMFXL"      1) ;                 Fixed Extension Line
(command "DIMFXLON"    "Off") ;             Enable Fixed Extension Line
(command "DIMGAP"      "3/32") ;            Gap from dimension line to text
(command "DIMJOGANG"   45.00) ;             Radius dimension jog angle
(command "DIMJUST"     0) ;                 Justification of text on dimension line
(command "DIMLDRBLK"   ".") ;               Leader block name
(command "DIMLFAC"     1.00000) ;           Linear unit scale factor
(command "DIMLIM"      "Off") ;             Generate dimension limits
(command "DIMLTEX1"    "BYBLOCK") ;         Linetype extension line 1
(command "DIMLTEX2"    "BYBLOCK") ;         Linetype extension line 2
(command "DIMLTYPE"    "BYBLOCK") ;         Dimension linetype
(command "DIMLUNIT"    4) ;                 Linear unit format
(command "DIMLWD"      -2) ;                Dimension line and leader lineweight
(command "DIMLWE"      -2) ;                Extension line lineweight
(command "DIMPOST"     ".") ;               Prefix and suffix for dimension text
(command "DIMRND"      0) ;                 Rounding value
(command "DIMSAH"      "Off") ;             Separate arrow blocks
(command "DIMSD1"      "Off") ;             Suppress the first dimension line
(command "DIMSD2"      "Off") ;             Suppress the second dimension line
(command "DIMSE1"      "Off") ;             Suppress the first extension line
(command "DIMSE2"      "Off") ;             Suppress the second extension line
(command "DIMSOXD"     "Off") ;             Suppress outside dimension lines
(command "DIMTAD"      0) ;                 Place text above the dimension line
(command "DIMTDEC"     4) ;                 Tolerance decimal places
(command "DIMTFAC"     1.00000) ;           Tolerance text height scaling factor
(command "DIMTFILL"    0) ;                 Text background enabled
(command "DIMTFILLCLR" 0) ;                 Text background color
(command "DIMTIH"      "On") ;              Text inside extensions is horizontal
(command "DIMTIX"      "Off") ;             Place text inside extensions
(command "DIMTM"       0) ;                 Minus tolerance
(command "DIMTMOVE"    0) ;                 Text movement
(command "DIMTOFL"     "Off") ;             Force line inside extension lines
(command "DIMTOH"      "On") ;              Text outside horizontal
(command "DIMTOL"      "Off") ;             Tolerance dimensioning
(command "DIMTOLJ"     1) ;                 Tolerance vertical justification
(command "DIMTP"       0) ;                 Plus tolerance
(command "DIMTSZ"      0) ;                 Tick size
(command "DIMTVP"      0.00000) ;           Text vertical position
(command "DIMTXSTY"    "Standard") ;        Text style
(command "DIMTXT"      "3/32") ;            Text height
(command "DIMTZIN"     0) ;                 Tolerance zero suppression
(command "DIMUPT"      "Off") ;             User positioned text
(command "DIMZIN"      3) ;                 Zero suppression

  ;==========================================================================================================================================Layer setups for backgrounds
  (prompt "\nThawing and Showing all layers.")
  (command "layer" "t" "*" "on" "*" "u" "*" "")
  (command "regen" "")
  (prompt "\nUnlocking all layers!")
  (command "layer" "unlock" "*" "")
  ;==========================================================================================================================================
  (prompt "\nBinding All XREF's!!!!!")
  (command "-xref" "Bind" "*") ;aecfileopenmessage
  ;==========================================================================================================================================
  (prompt "\nAll Layers Made Color 8 Grey !!!")
  (command "-layer" "s" "0" "")
  (command "-layer" "t" "*" "")
  (command "-layer" "u" "*" "")
  (command "setbylayer" "all" "" "yes" "yes")
  (command "chprop" "all" "" "c" "bylayer" "")
  (command "_.layer" "c" "8" "*" "")
  (command "_.layer" "c" "8" "0" "")
  (prompt "\nLayer Defpoints Color is White!")
  (command "_.layer" "c" "7" "DEFPOINTS" "")
  (prompt "\nLayers with PAT in name, The color changing to 19!!!")
  (command "-layer" "c" "19" "*pat*" "")
  (prompt "\nLayers with HAT in name, The color changing to 19!!!")
  (command "-layer" "c" "19" "*hat*" "")
  (prompt "\nLayers with AREA in name, The color changing to 19!!!")
  (command "-layer" "c" "19" "*area*" "")
  (prompt "\nLayers with GRID in name, The color changing to 19!!!")
  (command "-layer" "c" "19" "*grid*" "")
  (command "regenall")
  ;==========================================================================================================================================
  ;(c:mkbylayer)
  ;(command "chprop" "all" "" "c" "bylayer" "")
  ;(command "_.layer" "c" "8" "*" "")
  ;(command "regenall")
    (princ "\nAEC Objects will be removed.
  XREF's will be bound due to nesting of AEC objects.
  You will find your file with the Zbase- suffix in the filename.
Press Enter to continue....")
  (command "-exporttoautocad")
  ;(command "Suffix")
  ;(command "-Zbase")
  (command "Prefix")
  (command "Zbase-")
  (command "Bind")
  (command "Yes" "" "")
  (princ "\nAEC Objects have been removed in the drawing with 'Zbase-Filename.dwg' in the name.") 
  ;(command "close" "y") 
  ;==========================================================================================================================================Turn on command line responses
  (setvar "CMDECHO" 1); DO NOT CHANGE THIS LINE
  ;==========================================================================================================================================
  (princ)
)