Author Topic: Working with multiple CAD Standards  (Read 684 times)

0 Members and 1 Guest are viewing this topic.

GDF

  • Water Moccasin
  • Posts: 1920
Working with multiple CAD Standards
« on: May 03, 2018, 10:04:43 AM »
I looking to simplify my switching between different CAD Standards. The enclosed routine works for me; but I'm just wondering how others are going about it.

The different clients are located in their own directory structure (see image) for both drawing files the on "F:\" drive, and CAD Standard routines on "V:\" drive.

Gary
Why is there never enough time to do it right, but always enough time to do it over?
AutoCAD 2012x64 and BricsCAD 2018x64 Windows 7x64

Crank

  • Swamp Rat
  • Posts: 1410
Re: Working with multiple CAD Standards
« Reply #1 on: May 03, 2018, 12:37:54 PM »
In the past we had to deal with 3 'standards'. I had 3 menu's and it took a lot of time to maintain. Though separated on disk, the drafters regulary mixed standards. Switching between standards was also confusing, because not all standards where using the same pen colors.

When a 4th 'standard' was introduces, I desided to make everything possible with 1 menu. The startup looks at the template and sets a variable for that standard. Depending on that variable the lisp-routine uses fonts, dimstyles, etc. of that particilar standard.

Further more , all pen colors are the made same, this makes it easier for the drafter to switch and there is only one plotter setting necessary. When we deliver a drawing to the client, we use a conversion routine to set the pen colors according their standard.

 Vault Professional 2018   /   Building Design Suite Ultimate 2017  /  AEC Collection 2018+2019   /   Acad Qubit

GDF

  • Water Moccasin
  • Posts: 1920
Re: Working with multiple CAD Standards
« Reply #2 on: May 03, 2018, 01:05:11 PM »
I know...problamatic.

My goal is to have the CAD Standard: settings, menu and routines to load up based upon the clients working drawing directory. This works so long as you don't jump from one director to another within the AutoCAD/BricsCAD session.

I have started using "wscurrent" settings in saving the setup.

Gary
Why is there never enough time to do it right, but always enough time to do it over?
AutoCAD 2012x64 and BricsCAD 2018x64 Windows 7x64

GDF

  • Water Moccasin
  • Posts: 1920
Re: Working with multiple CAD Standards
« Reply #3 on: May 03, 2018, 01:21:57 PM »
I started out modifying the ".mnu" files long ago, and still do it today. I can change up the ".mnu" file and reload it to compile it into the new ".cuix" menu.

To simplify menu changes for updating the CAD Standards, I do the following routine: (C:RePMD)...super fast.
Code: [Select]
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; PMdesign Menu Loader ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defun C:RePMD  ()
  (command "menuunload" "PMdesign")
  (command "menuload" "PMdesign.mnu")
  (Place:PMdesign)
  (C:PMD)
  (princ))
;;;
(defun Place:PMdesign  (/ CNT)
  (setq CNT 1)
  (while (< CNT 24)
    (if (menucmd (strcat "P" (itoa CNT) ".1=?"))
      (setq CNT (1+ CNT))
      (progn (if (> CNT 2)
               (setq CNT (1- CNT))
               (setq CNT 2))
             (menucmd (strcat "p" (itoa CNT) "=+PMdesign.pop130"))
             (setq CNT 25)))))
(defun Load:PMdesign  (/ ProgLoad)
  (setq ProgLoad (findfile (strcat ARCH#DIRL "_PMdesign\\Support\\PMdesign.cuix")))
  (cond
    ((/= ProgLoad nil)
     (progn (command "menuunload" "PMdesign" "menuload" "PMdesign")
            (Place:PMdesign)
            (command "toolbar" "PMDesign.PMD-Ceiling" "show")
            (command "toolbar" "PMDesign.PMD-Ceiling" "bottom" "0,0")
            (princ "\n*** ------------- PMdesign Menu Loaded ------------- ***")))
    ((= ProgLoad nil)
     (ARCH:MsgBox2
       " Arch Program : Info"
       48
       "
     Arch Program© Alert
---------------------------------------------------------------------------
     PMdesign Menu is Not Loaded!"
       4)))
  (princ))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; PMD ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defun C:PMD  ()
  (setq ARCH#CUSN "PMdesign")
  (setq ARCH#CUSF (strcat ARCH#DIRL "_" "PMdesign" "\\")) 
  (ARCH:LOAD (strcat ARCH#DIRL "_PMdesign\\PMdesign.lsp"))
  (ARCH:LOAD (strcat ARCH#DIRL "_PMdesign\\PMdesign_Copyright.lsp"))
  (if (/= (menugroup "BPS") nil)
    (command "menuUNload" (strcat ARCH#CUSF "support\\BPS")))
  (if (= (menugroup "PMdesign") nil)
    (command "menuload" "PMdesign"))
  (cond ((= "BRICSCAD" (strcase (getvar 'product))) (MENU:BRICSCAD))
        ((/= "BRICSCAD" (strcase (getvar 'product))) (MENU:AutoCAD)))
  (Load:PMdesign) 
  (setq ProgName (strcase (getvar 'product)))
  (cond ((/= "BRICSCAD" (strcase (getvar 'product)))(setvar "wscurrent" "PMdesign"))
        ((= "BRICSCAD" (strcase (getvar 'product)))(setvar "wscurrent" "2D Drafting")))
  (ARCH:MENU-STARTUP)
  (command "toolbar" "arch.arch_program" "hide")
  (princ))
Why is there never enough time to do it right, but always enough time to do it over?
AutoCAD 2012x64 and BricsCAD 2018x64 Windows 7x64

dgorsman

  • Water Moccasin
  • Posts: 2320
Re: Working with multiple CAD Standards
« Reply #4 on: May 03, 2018, 02:32:09 PM »
Hold on a minute - are you changing to different code to suit different client standards?  Or are you keeping the code the same, and changing data sources?
If you are going to fly by the seat of your pants, expect friction burns.

try {GreatPower;}
   catch (notResponsible)
      {NextTime(PlanAhead);}
   finally
      {MasterBasics;}

steve.carson

  • Newt
  • Posts: 65
Re: Working with multiple CAD Standards
« Reply #5 on: May 03, 2018, 02:56:43 PM »
Here's how we do it. Can't share the code, but can share what the dialog box looks like. The "Presets" at the top are various client standards and come from a text file.

GDF

  • Water Moccasin
  • Posts: 1920
Re: Working with multiple CAD Standards
« Reply #6 on: May 03, 2018, 03:04:59 PM »
Mostly changing different code to suit client standards.
Fortunately I only work with one client a day.



Steve, I like the pick you posted.
Why is there never enough time to do it right, but always enough time to do it over?
AutoCAD 2012x64 and BricsCAD 2018x64 Windows 7x64

dgorsman

  • Water Moccasin
  • Posts: 2320
Re: Working with multiple CAD Standards
« Reply #7 on: May 03, 2018, 03:28:10 PM »
Mostly changing different code to suit client standards.
Fortunately I only work with one client a day.

Trying to handle standards differently for each client makes for a *lot* of extra work.

Like Steve, we have a common method for storing and applying standard settings, and work with it by the same code and UI regardless of client.  Each program has it's own AutoCAD profile, and at start-up the user selects the client, which in turn determines what types of files (and associated data files) are used.
If you are going to fly by the seat of your pants, expect friction burns.

try {GreatPower;}
   catch (notResponsible)
      {NextTime(PlanAhead);}
   finally
      {MasterBasics;}

cmwade77

  • Swamp Rat
  • Posts: 1140
Re: Working with multiple CAD Standards
« Reply #8 on: May 07, 2018, 04:28:21 PM »
For the most part management makes sure our contracts state that we can use our own CAD Standards, but there are the occasions where we can't. We have tried a few approaches over the years, one option is to setup a "standards" lisp routine that sets the CAD Standards based on a text file you place in the project folder (see code below for example). While this approach does indeed work, it also requires modifying all of your LISP routines accordingly, this approach also consumes more memory.

Another approach is to setup a drawing standards (DWS) file to compare with, the problem with this method is you have to manually select what to replace things with and you can't save the replacements for later.

So something that can speed this approach up quite a bit is to first use the Laytrans command.

For us, we no longer use the first method, instead here is what we do when there are client specific CAD standards:
  • We draw everything to our normal CAD standards, our drafters and designers are familiar with this and it works the fastest
  • We setup a layer map that maps layers from out standards to the client standards
  • We setup a Drawing Standards Template based on the client standards.
  • For submittals where we are only submitting plots or PDFs, we simply plot as we normally would per our CAD Standards.
  • The only time we mess with the standards and laytrans commands are just before we submit CAD files, this minimizes the time spent converting to their standards while giving the client the standards they have asked for.

This approach sounds complicated when you write it out like this, but it actually reduces the time spent messing with client specific standards.



Code: [Select]
;*********************************************************************************************************************************************************
; Determines the project's Standards **
(defun standards (); Begining of the definition of the function. **
  (setq pth (getvar "dwgprefix"))
  (setq fname (strcat pth "standards.sts")) 
  (if (setq fil(open fname "r")); If the standards file exists, then open it for reading. **   
    (Progn; required for multiple statements in the if command. **
      (setq stand 0)
     ;while the line from text file does not equal nil
    (while (setq lineone(read-line fil))           
(if (/= lineone nil)
(progn
  ;(print stand)
  (setq stand (+ stand 1))
  ;(print stand)
  (cond    
  ((= stand 1)
(progn
    (setq textlayer lineone)
   )
)

((= stand 2)
(progn
   (setq textcolor lineone)
   )
)

((= stand 3)
(progn
   (setq textlw lineone)
   )
)

((= stand 4)
(progn
   (setq textps lineone)
   )
)

((= stand 5)
(progn
   (setq textlt lineone)
   )
)

((= stand 6)
(progn
   (setq textsgen lineone)
   )
)

((= stand 7)
(progn
   (setq textsti lineone)
   )
)

((= stand 8)
(progn
   (setq texthgen lineone)
   (setq texthgen (atof texthgen))
   )
)

((= stand 9)
(progn
   (setq texthti lineone)
   (setq texthti (atof texthti))
   )
)

((= stand 10)
(progn
   (setq dimst lineone)
   )
)

((= stand 11)
(progn
   (setq dimstsc lineone)
   )
)

((= stand 12)
(progn
   (setq dimlay lineone)
   )
)

((= stand 13)
(progn
   (setq dimlaysc lineone)
   )
)

((= stand 14)
(progn
   (setq pltme lineone)
   )
)

((= stand 15)
(progn
   (setq plttbl lineone)
   )
)

((= stand 16)
(progn
   (setq textwfgen lineone)    
   )
)

((= stand 17)
(progn
   (setq textwfti lineone)
   )
)

((= stand 18)
(progn
   (setq itstyle lineone)
   )
)

  ((= stand 19)
(progn
   (setq itfont lineone)
   )
)

      ((= stand 20)
(progn
   (setq itheight lineone)
   (setq itheight (atof itheight))
   )
)
     
      ((= stand 21)
(progn
   (setq itwf lineone)
   )
)

    ((= stand 22)
(progn
   (setq textgenff lineone)
   )
)

  ((= stand 23)
(progn
   (setq texttff lineone)
   )
)

((= stand 24)
(progn
   (setq propa lineone)
   )
)

((= stand 25)
(progn
   (setq ahosz lineone)
   (setq ahosz (atof ahosz))
   )
)

((= stand 26)
(progn
   (setq ahos lineone)
   )
)

((= stand 27)
(progn
   (setq ahmsz lineone)
   (setq ahmsz (atof ahmsz))
   )
)

((= stand 28)
(progn
   (setq pabadimlayer lineone)
   )
)

((= stand 29)
(progn
   (setq pabadimcolor lineone)
   )
)

((= stand 30)
(progn
   (setq pabadimlw lineone)
   )
)

((= stand 31)
(progn
   (setq pabadimps lineone)
   )
)

((= stand 32)
(progn
   (setq pabadimlt lineone)
   )
)

((= stand 33)
(progn
   (setq ldrlayer lineone)
   )
)

((= stand 34)
(progn
   (setq ldrclr lineone)
   )
)

((= stand 35)
(progn
   (setq ldrlw lineone)
   )
)

((= stand 36)
(progn
   (setq ldrps lineone)
   )
)

((= stand 37)
(progn
   (setq ldrlt lineone)
   )
)

((= stand 38)
(progn
   (setq rslnb lineone)
   )
)

((= stand 39)
(progn
   (setq lslnb lineone)
   )
)

((= stand 40)
(progn
   (setq ahms lineone)
   )
)

((= stand 41)
(progn
   (setq mdlnb lineone)
   )
)

((= stand 42)
(progn
   (setq gnnb lineone)
   )
)

((= stand 43)
(progn
   (setq txtlayer lineone)
   )
)

((= stand 44)
(progn
   (setq txtcolor lineone)
   )
)

((= stand 45)
(progn
   (setq txtlw lineone)
   )
)

((= stand 46)
(progn
   (setq txtps lineone)
   )
)

((= stand 47)
(progn
   (setq txtlt lineone)
   )
)


    );end cond
  )
  )
     ) ; close the while loop

     ;close the text file
     (close fil)

      ); end progn
    (costandards)
      ); end if file exists 
 ); End of Standards Function

(defun costandards () 
  (PROGN   
  ;Change the path below to whereever you saved the standards.sts file
  (if (setq fil(open "H:\\0ACAD Support\\standards.sts" "r")); If the standards file is not in the project folder, then open the main one for editing, please note that you will need to change this path if you have this file in a different location. **   
    (Progn; required for multiple statements in the if command. **     
      (setq stand 0)
     ;while the line from text file does not equal nil
    (while (setq lineone(read-line fil))
      ;(print stand)
(if (/= lineone nil)
(progn
  ;(print stand)
  (setq stand (+ stand 1))
  ;(print stand)
  (cond    
  ((= stand 1)
(progn
    (setq textlayer lineone)
   )
)

((= stand 2)
(progn
   (setq textcolor lineone)
   )
)

((= stand 3)
(progn
   (setq textlw lineone)
   )
)

((= stand 4)
(progn
   (setq textps lineone)
   )
)

((= stand 5)
(progn
   (setq textlt lineone)
   )
)

((= stand 6)
(progn
   (setq textsgen lineone)
   )
)

((= stand 7)
(progn
   (setq textsti lineone)
   )
)

((= stand 8)
(progn
   (setq texthgen lineone)
   (setq texthgen (atof texthgen))
   )
)

((= stand 9)
(progn
   (setq texthti lineone)
   (setq texthti (atof texthti))
   )
)

((= stand 10)
(progn
   (setq dimst lineone)
   )
)

((= stand 11)
(progn
   (setq dimstsc lineone)
   )
)

((= stand 12)
(progn
   (setq dimlay lineone)
   )
)

((= stand 13)
(progn
   (setq dimlaysc lineone)
   )
)

((= stand 14)
(progn
   (setq pltme lineone)
   )
)

((= stand 15)
(progn
   (setq plttbl lineone)
   )
)

((= stand 16)
(progn
   (setq textwfgen lineone)    
   )
)

((= stand 17)
(progn
   (setq textwfti lineone)
   )
)

((= stand 18)
(progn
   (setq itstyle lineone)
   )
)

  ((= stand 19)
(progn
   (setq itfont lineone)
   )
)

      ((= stand 20)
(progn
   (setq itheight lineone)
   (setq itheight (atof itheight))
   )
)
     
      ((= stand 21)
(progn
   (setq itwf lineone)
   )
)

    ((= stand 22)
(progn
   (setq textgenff lineone)
   )
)

  ((= stand 23)
(progn
   (setq texttff lineone)
   )
)

((= stand 24)
(progn
   (setq propa lineone)
   )
)

((= stand 25)
(progn
   (setq ahosz lineone)
   (setq ahosz (atof ahosz))
   )
)

((= stand 26)
(progn
   (setq ahos lineone)
   )
)

((= stand 27)
(progn
   (setq ahmsz lineone)
   (setq ahmsz (atof ahmsz))
   )
)

((= stand 28)
(progn
   (setq pabadimlayer lineone)
   )
)

((= stand 29)
(progn
   (setq pabadimcolor lineone)
   )
)

((= stand 30)
(progn
   (setq pabadimlw lineone)
   )
)

((= stand 31)
(progn
   (setq pabadimps lineone)
   )
)

((= stand 32)
(progn
   (setq pabadimlt lineone)
   )
)

((= stand 33)
(progn
   (setq ldrlayer lineone)
   )
)

((= stand 34)
(progn
   (setq ldrclr lineone)
   )
)

((= stand 35)
(progn
   (setq ldrlw lineone)
   )
)

((= stand 36)
(progn
   (setq ldrps lineone)
   )
)

((= stand 37)
(progn
   (setq ldrlt lineone)
   )
)

((= stand 38)
(progn
   (setq rslnb lineone)
   )
)

((= stand 39)
(progn
   (setq lslnb lineone)
   )
)

((= stand 40)
(progn
   (setq ahms lineone)
   )
)

((= stand 41)
(progn
   (setq mdlnb lineone)
   )
)

((= stand 42)
(progn
   (setq gnnb lineone)
   )
)

((= stand 43)
(progn
   (setq txtlayer lineone)
   )
)

((= stand 44)
(progn
   (setq txtcolor lineone)
   )
)

((= stand 45)
(progn
   (setq txtlw lineone)
   )
)

((= stand 46)
(progn
   (setq txtps lineone)
   )
)

((= stand 47)
(progn
   (setq txtlt lineone)
   )
)


    );end cond
  );end progn
  );end if not blank
     ) ; close the while loop

     ;close the text file
     (close fil)

);end progn
  );end if file found
  );end progn
);end function
(standards)

GDF

  • Water Moccasin
  • Posts: 1920
Re: Working with multiple CAD Standards
« Reply #9 on: May 08, 2018, 04:32:33 AM »
Awesome, thanks for the feed back. This exactly what I have been looking for.
Why is there never enough time to do it right, but always enough time to do it over?
AutoCAD 2012x64 and BricsCAD 2018x64 Windows 7x64

kruuger

  • Swamp Rat
  • Posts: 611
Re: Working with multiple CAD Standards
« Reply #10 on: May 16, 2018, 06:51:02 AM »
hi
we are working with dozen companies. just finished our new setups. im pretty happy with this.
we associates dwg with specific company in autocad dictionaries (image 1).
than we wrote one lisp for specific tasks which reads dictionary value and run them with specific settings (layer, blocks, dims etc) (image 2)
if we need to modify any lisp we do this only with one file.
kruuger

GDF

  • Water Moccasin
  • Posts: 1920
Re: Working with multiple CAD Standards
« Reply #11 on: May 16, 2018, 08:28:16 AM »
Nice

I now change CAD Standards, workspace, plot configs, copyright settings, etc thru a drop down menu or hot keys at the command line. The changes will propagate my dialog boxes with each different standard.  Some of the changes will load a client's sub menu.

For example, the Layer dialog box with have different "layer creator listings" loaded with each standard.

So far, everything runs smoothly so long as I only work with one client at a work session time.

Gary
Why is there never enough time to do it right, but always enough time to do it over?
AutoCAD 2012x64 and BricsCAD 2018x64 Windows 7x64

kruuger

  • Swamp Rat
  • Posts: 611
Re: Working with multiple CAD Standards
« Reply #12 on: May 16, 2018, 11:35:07 AM »
Nice

I now change CAD Standards, workspace, plot configs, copyright settings, etc thru a drop down menu or hot keys at the command line. The changes will propagate my dialog boxes with each different standard.  Some of the changes will load a client's sub menu.

For example, the Layer dialog box with have different "layer creator listings" loaded with each standard.

So far, everything runs smoothly so long as I only work with one client at a work session time.

Gary
with dictionary you can easily work with any company at one session of autocad.
when you run your dialog box, tool will read dictionary and load proper layer settings into dialog.
shortly, you data for dialog needs to be created "on the fly"
kruuger

GDF

  • Water Moccasin
  • Posts: 1920
Re: Working with multiple CAD Standards
« Reply #13 on: May 16, 2018, 04:31:02 PM »
Thanks for the tip. Now I can check for the copyright xdata than I have always placed on layer "0".

I will set the standard based upon the "DWG_OWNED_BY" name. This xdata is set whenever I save the drawing.

It works smoothly now, whenever I open a saved drawing with the copyright xdata.


Code: [Select]
(defun ARCH:SetXdata  (/ tdcreate appname data elist ent item lyr n table datst crdate dwginfo)
  (ARCH:DATE2)
  ;;(setq TDCREATE (menucmd (strcat "M=$(edtime,$(getvar,tdcreate),MON\" \"DD\" \"YYYY)")))
  (setq TDCREATE (menucmd (strcat "M=$(edtime,$(getvar,tdcreate),YYYY)")))
  (setq DATST  (rtos (getvar "CDATE") 2 16)
        CRDATE (substr DATST 1 4))
  (setq ARCH#XDCn (strcat "Date:" "\t\t" "©" TDCREATE " [Saved: " ARCH#DATE "]\n"))
  (setq ARCH#XDAD (strcat "Address:" "\t\t" "City, State. xxxxx"))
  (setq ARCH#XDTP (strcat "Phone:" "\t\t" "972.533.9577"))
  (setq ARCH#XDWW (strcat "Email:" "\t\t" "Your Website.com"))
  (setq ARCH#XDPR
         (strcat "Copyrighted by:"
                 "        Your Name  All rights reserved by the author.")) 
  (setq appname "DWG_OWnED_BY")
  (regapp appname)
  (setq item nil
        data nil)
  (setq item (cons ARCH#XDWW
                   (cons ARCH#XDTP (cons ARCH#XDAD (cons ARCH#XDCn (list ARCH#XDPR))))))
  (setq n 1)
  (foreach
         S  item
    (setq elist (set (read (strcat "X" (itoa n))) (cons 1000 S)))
    (setq data (cons elist data))
    (setq n (1+ n)))
  (setq table (list (list -3 (cons appname data))))
  (setq lyr (tblobjname "layer" "0"))
  (setq ent (entget lyr))
  (entmod (append ent table))
  (princ (setq table (cdadr (assoc -3 table))))
  (princ))


(defun CAD:Standard  (/ xda)
  (setq XDA (cdadr (assoc -3 (entget (tblobjname "layer" "0") (list "DWG_OWnED_BY")))))
  (princ "\n*** ------ No Copyright Xdata Found ------ ***")
  (if (/= XDA nil)
    (cond
      ((= (cdar XDA) "Copyrighted by:         Gary D Fowler  All rights reserved by the author.")
        (C:GDF))

      ((= (cdar XDA) "Copyrighted by:         Covert + Associates, LLC  All rights reserved.")
        (C:A+A))

      ((= (cdar XDA) "Copyrighted by:         PM Design, Inc. All rights reserved.")
        (C:PMD))

      ((= (cdar XDA) "Copyrighted by:         Architettura, Inc.  All rights reserved by the author.")
        (C:FWP))

      ((= (cdar XDA) "Copyrighted by:         Builders Plan Service, LLC  All rights reserved.")
        (C:BPS))
    )
  )
  (princ))
Why is there never enough time to do it right, but always enough time to do it over?
AutoCAD 2012x64 and BricsCAD 2018x64 Windows 7x64

GDF

  • Water Moccasin
  • Posts: 1920
Re: Working with multiple CAD Standards
« Reply #14 on: May 16, 2018, 05:08:44 PM »
Here is an updated example of the LAYS dialog box switching between two different standards.
Why is there never enough time to do it right, but always enough time to do it over?
AutoCAD 2012x64 and BricsCAD 2018x64 Windows 7x64