Friday, December 20, 2024

Minor CAD Rant about who expects what

 Hmmf!....I was thinking that I might be chucking the job in around the end of August.

Still going!

It is Xmas holidays and I have come to the end of my project, for the past week working about 2-3 hours per day doing tidy up stuff.  These are my previous sins deciding to come back and bite me.  Like getting quantities wrong.  Like leaving off dimensions. Like using old filenames as fodder for new filenames. Fine, if you choose the right filename, but can be very confusing if you pick the wrong one. 

I suppose old dogs can learn something with that.  Probably not. More like overdosing on piping drawings.

One thing that I have found is that an outside supplier might send you a cad file of their plant for you to put into your drawing.  Nice, except the only thing Autocad wants to snap to is endpoints, because the whole damn thing is parasolids or surfaces.  Combine this with their idiotic preference for downloading things like motors that have all the silly fins on the motor and you have drafting that should be straight forward becomes a painful chore.

Luckily, on my job I was able to make time to replace such stupidity with much simpler shapes. So in the end my work computer T1000 graphics and 32MB ram coped ok with what ended up quite a large model.  I did get nervous towards the end as I added yet more pipe supports though. 

One of my coworkers seems not quite so lucky as the other job he is on has large plants from suppliers to insert, which are not quite so easy to thin down. This leads to long load times, and lack of responsiveness. This has led some to question: are we on the right track using Autocad?  Would say Inventor or Solidworks or Catia or Microstation or Revit be a better option for working on large projects?

The only one of those I have experience with is Revit, although not in the context of using the piping option. 

Personally, I believe Autocad, combined with parallel usage of Navisworks is the way to go.

One of my friends has experience with Inventor and claims he finds Autocad easier to think in.

That does not mean Autocad is the perfect solution, but I suspect a little work at the start of the project would mean things would go a lot smoother.

To do this, suppose I get a plant drawing from a supplier called PlantfromHell.  All you need to do is create the dwg file called PlantfromHell.dwg, and the first thing to do would be to save it in a folder labelled PlantfromHellComplex.  Then do a save as into a folder called PlantfromHellSimple, with   THE SAME FILE NAME!

In the simple one, identify all the items that actually interface with the rest of the factory. Delete all the rest of the junk and replace with a simple box.  Your file size is now bugger all!

Now xref your simple drawing into your main drawing.  Life is good!  When the sales guys and people with unrealistic expectations start to complain, all you have to do is change the path on the xref to the complex one.  Oh joy! Sit back get cups of coffee, sit back and listen to Vivaldi's four seasons or Tracey Grammer and zone out.

Another thing vital to know before starting is short radius bends or long?

A thing I wished I had going before I started was means of quickly inserting things like:Triclover ferrules, Pipe Supports, non return valves, and manual valves, all for use with diary piping.  Towards the end of the project I created such a routine, along with simplified blocks and this made life a lot easier. I will post a demo of this on my Youtube channel, BIlrocad, it I can muster enough enthusiasm.

In case you feel inspired, here is the dcl file, followed by the lsp file.  The blocks you will have to make yourself (if you are in this game, you will likely have these anyway).

Apologies for the mad ways of writing the lisp, but hey it works!

You would have to change the path for the blocks to your preference.


//Bilro Systems pipe VARIABLES SETTER

triclover1 : dialog {

    

    aspect_ratio = 0;

    label = "Dairy Pipe Items Inserter";

:row{  


:radio_column {  

                key = "FERRULESIZE";     

               :text {label = "Ferrules";} 

                 :radio_button {

                key = "25.4";

                label = "25.4";

                          }

                

                 :radio_button {

                key = "38.1";

                label = "38.1";

                          }

                 :radio_button {

                key = "50.8";

                label = "50.8";

                         }

  :radio_button {

                key = "63.5";

                label = "63.5";

                         }

  :radio_button {

                key = "76.2";

                label = "76.2";

                         }

  :radio_button {

                key = "101.6";

                label = "101.6";

                         }

 

  :radio_button {

                key = "152.4";

                label = "152.4";

                         }

                   }    

       

  

:radio_column {  

                key = "MANUALVALVES";     

               :text {label = "Manual Valves";} 

               


:radio_button {

                key = "12.7 MV";

                label = "12.7 MV";

                          }

  :radio_button {

                key = "19.0 MV";

                label = "19.0 MV";

                        }


:radio_button {

                key = "25.4 MV";

                label = "25.4 MV";

                          }

                

                 :radio_button {

                key = "38.1 MV";

                label = "38.1 MV";

                          }

                 :radio_button {

                key = "50.8 MV";

                label = "50.8 MV";

                         }

  :radio_button {

                key = "63.5 MV";

                label = "63.5 MV";

                         }

  :radio_button {

                key = "76.2 MV";

                label = "76.2 MV";

                         }

  :radio_button {

                key = "101.6 MV";

                label = "101.6 MV";

                         }

 

  :radio_button {

                key = "152.4 MV";

                label = "152.4 MV";

                         }

                   }    


:radio_column {  

                key = "CHECK VALVES";     

               :text {label = "Check Valves";} 

               


:radio_button {

                key = "12.7 CV";

                label = "12.7 CV";

                          }

  :radio_button {

                key = "19.0 CV";

                label = "19.0 CV";

                        }


:radio_button {

                key = "25.4 CV";

                label = "25.4 CV";

                          }

                

                 :radio_button {

                key = "38.1 CV";

                label = "38.1 CV";

                          }

                 :radio_button {

                key = "50.8 CV";

                label = "50.8 CV";

                         }

  :radio_button {

                key = "63.5 CV";

                label = "63.5 CV";

                         }

  :radio_button {

                key = "76.2 CV";

                label = "76.2 CV";

                         }

  :radio_button {

                key = "101.6 CV";

                label = "101.6 CV";

                         }

 

  :radio_button {

                key = "152.4 CV";

                label = "152.4 CV";

                         }

                   }    


:radio_column {  

                key = "PIPE SUPPORTS";     

               :text {label = "Pipe Supports";} 

               


:radio_button {

                key = "12.7 PS";

                label = "12.7 PS";

                          }

  :radio_button {

                key = "19.0 PS";

                label = "19.0 PS";

                        }


:radio_button {

                key = "25.4 PS";

                label = "25.4 PS";

                          }

                

                 :radio_button {

                key = "38.1 PS";

                label = "38.1 PS";

                          }

                 :radio_button {

                key = "50.8 PS";

                label = "50.8 PS";

                         }

  :radio_button {

                key = "63.5 PS";

                label = "63.5 PS";

                         }

  :radio_button {

                key = "76.2 PS";

                label = "76.2 PS";

                         }

  :radio_button {

                key = "101.6 PS";

                label = "101.6 PS";

                         }

 

  :radio_button {

                key = "152.4 PS";

                label = "152.4 PS";

                         }

                   }    



}

    ok_cancel;

}

That was the DCL file, now here is the lsp file:

;Program written by Bill Le Couteur 

;Auckland NZ

;Rev 0 date 22/9/24


(defun  c:triclover1( / )

(setvar "CMDECHO" 0)

(setq dcl_id (load_dialog "c:/bilro/piping/triclover/triclover1.dcl"))

   (if (not (new_dialog "triclover1" dcl_id)) 

       (exit)

   )


(action_tile "FERRULESIZE" "(pick_SIZE $value)")  

(action_tile "MANUALVALVES" "(pick_SIZE $value)")  

(action_tile "CHECK VALVES" "(pick_SIZE $value)")  

(action_tile "PIPE SUPPORTS" "(pick_SIZE $value)")  




(defun pick_SIZE (which)

    (cond

      ((= which "12.7") (setq show_which 0))  

      ((= which "15.9") (setq show_which 1))  

      ((= which "19") (setq show_which 2))

      ((= which "25.4") (setq show_which 3))

      ((= which "31.8") (setq show_which 4))

      ((= which "38.1") (setq show_which 5))

     

      ((= which "50.8") (setq show_which 7)) 

      ((= which "63.5") (setq show_which 8))                       

      ((= which "76.2") (setq show_which 9)) 

      ((= which "101.6") (setq show_which 10)) 

     

      ((= which "152.4") (setq show_which 12)) 


      ((= which "12.7 MV") (setq show_which 13))  

      ((= which "19.0 MV") (setq show_which 14))  

      ((= which "25.4 MV") (setq show_which 15))  

      ((= which "38.1 MV") (setq show_which 16))

      ((= which "50.8 MV") (setq show_which 17))

      ((= which "63.5 MV") (setq show_which 18))

      ((= which "76.2 MV") (setq show_which 19))

      ((= which "101.6 MV") (setq show_which 20)) 

      ((= which "152.4 MV") (setq show_which 21)) 



                          

      ((= which "12.7 CV") (setq show_which 22)) 

      ((= which "19.0 CV") (setq show_which 23)) 

      ((= which "25.4 CV") (setq show_which 24)) 

      ((= which "38.1 CV") (setq show_which 25)) 

      ((= which "50.8 CV") (setq show_which 26)) 

      ((= which "63.5 CV") (setq show_which 27)) 

      ((= which "76.2 CV") (setq show_which 28)) 

      ((= which "101.6 CV") (setq show_which 29)) 

      ((= which "152.4 CV") (setq show_which 30)) 



      ((= which "12.7 PS") (setq show_which 31)) 

      ((= which "19.0 PS") (setq show_which 32)) 

      ((= which "25.4 PS") (setq show_which 33)) 

      ((= which "38.1 PS") (setq show_which 34)) 

      ((= which "50.8 PS") (setq show_which 35)) 

      ((= which "63.5 PS") (setq show_which 36)) 

      ((= which "76.2 PS") (setq show_which 37)) 

      ((= which "101.6 PS") (setq show_which 38)) 

      ((= which "152.4 PS") (setq show_which 39)) 





;      ((= which "INPUT_SIZE") (setq show_which 30)) 

    )

  );end of defun pick_size











(action_tile "accept" "(done_dialog)") 

(action_tile "cancel" "(done_dialog)") 




(start_dialog)

(unload_dialog dcl_id) 


(cond

((= show_which 3) (command "-insert" "C:/Bilro/Piping/Triclover/Triclover Fittings/1 inch Triclover Ferrule 21.5.dwg" pause "1" "1" pause)) 

((= show_which 4) (command "-insert" "C:/Bilro/Piping/Triclover/Triclover Fittings/1.25 inch Triclover Ferrule 21.5.dwg" pause "1" "1" pause)) 

((= show_which 5) (command "-insert" "C:/Bilro/Piping/Triclover/Triclover Fittings/1 and half inch Triclover Ferrule 21.5.dwg" pause "1" "1" pause)) 

((= show_which 7) (command "-insert" "C:/Bilro/Piping/Triclover/Triclover Fittings/2 inch Triclover Ferrule 21.5.dwg" pause "1" "1" pause))   

((= show_which 8) (command "-insert" "C:/Bilro/Piping/Triclover/Triclover Fittings/2 and half inch Triclover Ferrule 21.5.dwg" pause "1" "1" pause)) 

((= show_which 9) (command "-insert" "C:/Bilro/Piping/Triclover/Triclover Fittings/3 inch Triclover Ferrule 21.5.dwg" pause "1" "1" pause)) 

((= show_which 10) (command "-insert" "C:/Bilro/Piping/Triclover/Triclover Fittings/4 inch Triclover Ferrule 21.5.dwg" pause "1" "1" pause)) 

((= show_which 12) (command "-insert" "C:/Bilro/Piping/Triclover/Triclover Fittings/6 inch Triclover Ferrule 21.5.dwg" pause "1" "1" pause)) 


((= show_which 13) (command "-insert" "C:/Bilro/Piping/Triclover/Manual Valves/0.5 inch Manual Ball Valve.dwg" pause "1" "1" pause)) 

((= show_which 14) (command "-insert" "C:/Bilro/Piping/Triclover/Manual Valves/0.75 inch Manual Ball Valve.dwg" pause "1" "1" pause)) 

((= show_which 15) (command "-insert" "C:/Bilro/Piping/Triclover/Manual Valves/1 inch Manual Ball Valve.dwg" pause "1" "1" pause)) 

((= show_which 16) (command "-insert" "C:/Bilro/Piping/Triclover/Manual Valves/1.5 inch Manual Ball Valve.dwg" pause "1" "1" pause)) 

((= show_which 17) (command "-insert" "C:/Bilro/Piping/Triclover/Manual Valves/2 inch Manual Ball Valve.dwg" pause "1" "1" pause))   

((= show_which 18) (command "-insert" "C:/Bilro/Piping/Triclover/Manual Valves/2 and half inch Manual Ball Valve.dwg" pause "1" "1" pause)) 

((= show_which 19) (command "-insert" "C:/Bilro/Piping/Triclover/Manual Valves/3 inch Manual Ball Valve.dwg" pause "1" "1" pause)) 

((= show_which 20) (command "-insert" "C:/Bilro/Piping/Triclover/Manual Valves/4 inch Manual Ball Valve.dwg" pause "1" "1" pause)) 

((= show_which 21) (command "-insert" "C:/Bilro/Piping/Triclover/Manual Valves/6 inch Manual Ball Valve.dwg" pause "1" "1" pause)) 


((= show_which 22) (command "-insert" "C:/Bilro/Piping/Triclover/Check Valves/0.5 inch Check Valve.dwg" pause "1" "1" pause)) 

((= show_which 23) (command "-insert" "C:/Bilro/Piping/Triclover/Check Valves/0.75 inch Check Valve.dwg" pause "1" "1" pause)) 

((= show_which 24) (command "-insert" "C:/Bilro/Piping/Triclover/Check Valves/1 inch Check Valve.dwg" pause "1" "1" pause)) 

((= show_which 25) (command "-insert" "C:/Bilro/Piping/Triclover/Check Valves/1.5 inch Check Valve.dwg" pause "1" "1" pause)) 

((= show_which 26) (command "-insert" "C:/Bilro/Piping/Triclover/Check Valves/2 inch Check Valve.dwg" pause "1" "1" pause))   

((= show_which 27) (command "-insert" "C:/Bilro/Piping/Triclover/Check Valves/2 and half inch Check Valve.dwg" pause "1" "1" pause)) 

((= show_which 28) (command "-insert" "C:/Bilro/Piping/Triclover/Check Valves/3 inch Check Valve.dwg" pause "1" "1" pause)) 

((= show_which 29) (command "-insert" "C:/Bilro/Piping/Triclover/Check Valves/4 inch Check Valve.dwg" pause "1" "1" pause)) 

((= show_which 30) (command "-insert" "C:/Bilro/Piping/Triclover/Check Valves/6 inch Check Valve.dwg" pause "1" "1" pause)) 



((= show_which 31) (command "-insert" "C:/Bilro/Piping/Triclover/Pipe Supports/0.5 inch Pipe Support.dwg" pause "1" "1" pause)) 

((= show_which 32) (command "-insert" "C:/Bilro/Piping/Triclover/Pipe Supports/0.75 inch Pipe Support.dwg" pause "1" "1" pause)) 

((= show_which 33) (command "-insert" "C:/Bilro/Piping/Triclover/Pipe Supports/1 inch Pipe Support.dwg" pause "1" "1" pause)) 

((= show_which 34) (command "-insert" "C:/Bilro/Piping/Triclover/Pipe Supports/1.5 inch Pipe Support.dwg" pause "1" "1" pause)) 

((= show_which 35) (command "-insert" "C:/Bilro/Piping/Triclover/Pipe Supports/2 inch Pipe Support.dwg" pause "1" "1" pause))   

((= show_which 36) (command "-insert" "C:/Bilro/Piping/Triclover/Pipe Supports/2 and half inch Pipe Support.dwg" pause "1" "1" pause)) 

((= show_which 37) (command "-insert" "C:/Bilro/Piping/Triclover/Pipe Supports/3 inch Pipe Support.dwg" pause "1" "1" pause)) 

((= show_which 38) (command "-insert" "C:/Bilro/Piping/Triclover/Pipe Supports/4 inch Pipe Support.dwg" pause "1" "1" pause)) 

((= show_which 39) (command "-insert" "C:/Bilro/Piping/Triclover/Pipe Supports/6 inch Pipe Support.dwg" pause "1" "1" pause)) 


                      

      

                        

);end cond


(print show_which)


(setvar "CMDECHO" 1)

(princ)

)




Friday, July 5, 2024

A simpler time, fun with BIM360, StreamBIM, Navisworks, late payers, and working on a large project

Just checked my blog stats, seems I have 2 followers.  Seem to get a few views so onwards!

 Once upon a time, I was a manual draftsman, with a set of pens, plastic templates and a compass.  These were my tools of trade.  

Not any more.  Here I am at nearly 78 years of age, working 8 hours a day, and trying to cope with more technological advances again, after being one of the early adopters of working in 3D Autocad.

I am thinking, shall I give this until the end of August, if AI does not do away with the job in the meantime.

The technological advance I am talking about is BIM360.  Apparently it has been out for a while, but I have not had reason to use it.

In case you are new to it, BIM360 is an Autodesk product and in a nutshell it is the same as Dropbox, but with bells on. The bells on are quite nice and work as follows:

You upload your model to the BIM360 site, in my case a a Revit model.  It then processes this and then you can view it.  This is quite amazing because it seems to cope with large models very nicely.  We are talking here about a large factory with every bastard's stupid ideas of what should be in a model.

If I sound bitter, it is because I am grumpy because I seem to be forever fighting a rear guard action against people who think it is a great idea to download a desk with a computer keyboard with all the keys on it and think this is a great idea!

This seems a good system for working collaboratively on large projects, with the various disciplines, ie Architectural, Structural and so on uploading their models so everyone can see the whole picture.

Unfortunately for such an older geezer, the buzz words keep coming just to muddy the waters a bit.  For instance "Federated Model", which apparently is big daddy drawing, where everything is fed into. It seems the Architects drawing is a logical one for this.

Another one is "Consumed", which I am still puzzling over.  Another puzzle for me is no one seems in control, although no doubt if I looked hard enough on all the Youtube videos I would find out.  Oh Joy! A job for this weekend.

Apparently the license for this is quite expensive, so another similar setup has been introduced, called StreamBIM, see here https://streambim.com/

Not as pretty as BIM360, and produces something similar to Navisworks.  Navisworks has been around for years now, and early on I was not that keen on it.  How things change: I now use it all the time and find it is a wonderful thing.  I can do a large 3D Autocad model, get that into Navisworks, save as an NWD file send that to my boss, who does not need Autocad to view it.  

It is also handy to check out your model, as the navigation tools are better than what is in Autocad.

Late payers, or people who do not pay at all: Is it just a New Zealand thing or is it world wide?  I have been working for the last 2 years for an architectural draftsman, who I find is not even a Licensed Building Practitioner, and early on was always a good payer, but lately has not been paying.  Plus other sundry people I have done work for who think not paying is OK.

Plus not giving be a consistent supply of work, meant I applied for a permanent job with the firm I am with now.  I applied, saying I am not the person you want, but I could fill in.  One year later I am still working there.  The office has no windows, which is why I asked to work at home 3 days per week and they let me do that.

Working on a large project is a new one for me.  What I have done is to split the thing up into rooms or areas.  There is a main model where all these are Xreffed in.

This approach works well, though I see a previous draftsman took this a bit too far, making a run of pipe an xref.










 

Saturday, January 20, 2024

Autolisp Routines for labelling piping PIDs

I am now working at a product process consultancy and one of the tasks is to 
look at a PID, and work out where the pipes on the diagram go.

Sometimes, there are no line numbers, so to make things easier on me, I decided to give all the pipes line numbers.  Normally these look like HW-50-001, ie they give an idea of what is in the pipe, it's size and lastly a number.

In line with my dubious philosophy of keeping life simple, I made a copy of the PID and set about numbering all the pipes with just a simple number , ie 1,2 and so on.

My cunning plan was to have an Excel spreadsheet with a From/To list, which would have product and size on there instead.

I also set up the 3d drawing of the pipes with a set of layers labelled 1, 2 and so on.

To save my sanity, I developed several lisp routines to help automate this process as the plant was quite large.

This first one sets up layer numbers in the 3D drawing.  It asks you for the first number and the last number. Then it creates all the layers, and makes the colour of the layer to be the colour number.  Yes, you are correct....this limits this idea to 250 layers.

I could modify the routine to allow for this at some stage.  I did notice that some colours are pretty dark, so this is a drawback that might have to be addressed.

(defun c:laysnum()
  (setq startno (getint "/n Start no: "))
  (setq finishno (getint "/n Finish no: "))
  (setq thenolayers (- finishno startno))

  (while (< startno finishno)
    (progn
      (setq thelayers (itoa startno))
      (command "-layer" "m" thelayers "c" thelayers "" "")
      (setq startno (+ startno 1))
    ) ; end progn
  ) ; end while
  (princ)
)

The second is for use on the PID and asks the user to select a line, then key in a number, eg 4, and then asks for a text position.  The routine changes the layer of the line to 4 and puts the text of "4" above the line.

All while assuming zero height text of course;)

(defun c:CLAT ()
(setq theent (car (entsel "\nSelect a line: ")))
(setq layerNumbers (getstring "\nEnter a number (X): "))
(setq textPosition (getpoint "\nSpecify text position: "))
(setq edata(entget theent))
(setq edata (subst (cons 8 layerNumbers) (assoc 8 ed) edata ))
(entmod edata)
(command "text" textPosition "" "" layernumbers)
  (princ)
);end defun

The next one does the same, just that it does not ask for a text position-this is for when you have the numbers already on the drawing.

(defun c:zzCLAT ()
(setq theent (car (entsel "\nSelect a line: ")))
(setq layerNumbers (getstring "\nEnter a number (X): "))
(setq edata(entget theent))
(setq edata (subst (cons 8 layerNumbers) (assoc 8 ed) edata ))
(entmod edata)
(princ)
);end defun

This one just puts in numbers only, sequentially.

(defun C:zzn( /  z b x y )
(setvar "CMDECHO" 0)
(command "osnap" "none")
(setq oldsnap (getvar "osmode"))
    (if (equal numberf nil)
        (setq numberf 1)
    )
(setq numbers (rtos numberf))
(while (not(equal numbers "299"))
(progn
(setq x (getpoint "\n Pick Number Position "))
(command "Text" x "" "" numbers)
(setq numberf(atof numbers))
(setq numberf (+ numberf 1))
(setq numbers (rtos numberf))
);end progn
);end while
(setvar "osmode" oldsnap)
(setvar "CMDECHO" 1)
 (princ)
)

Notice that there is a variable in there called numberf.  If you have used the routine once, it will persist and will pick up again where you left off.  To start again at a specified number use:

(defun  c:zzNUM()
(setq numberf (getreal "/nEnter your start number "))
(princ)
 )

If all this is confusing, try blecouteur14 the at thing at jeeeeemail, asking me to do a short video.