Engineering Automated design and autocad drawings

Engineering Automated design and autocad drawings

Anonymous
Not applicable
1,516 Views
5 Replies
Message 1 of 6

Engineering Automated design and autocad drawings

Anonymous
Not applicable

Hi, i would like to automate engineering designs such as electrical, water, sewerage distribution designs instead of performing calculations/modeling in conventional approach using excel then manually drafting the drawings in autocad. So basically i want to program a code so that the autocad can perform all engineering design calculations and produce drawings automatically in an automated way. The question is which API do you suggest to use to perform this task e.g. Autolisp, ObjectARX, VBA (if still available), .Net....etc? I am not an expert to know the diferences amonh them that's why i would appreciate your advise?

Note that i am not planning to create any new block within autocad, neither to develop a software for sale out of this, it is just to have a smart program/tool to perform design and drawings production in automated way?

Thanks 

0 Likes
1,517 Views
5 Replies
Replies (5)
Message 2 of 6

cadffm
Consultant
Consultant

If you know one language much better than the others, go for this one. If you have no idea at all, then the task is very difficult and I would suggest .Net.


.Net - So everything is possible for windows application , including beautiful graphic dialogues,
but a little fewer examples on the web and fewer programmers with DWG experience.

Sebastian

Message 3 of 6

Anonymous
Not applicable

Thanks for your response, i don't have any preference of any programming language than others, but what is the downside of autolisp for example? And what would be the advantage of the .Net?

As mentioned earlier, the autocad drawings will have only lines and blocks which are already saved in autocad library, so no requirements for beautiful graphics or any new blocks to be introduced. The idea ia just to make the code/program execute the design calculations and produce the drawings automatically as opposed to the conventional approach of spending a lot of time doing engineering design/calculations then spending more time drawing the design in autocad.

I hope this clarify my question further and would appreciate your response.

Thanks

0 Likes
Message 4 of 6

Sea-Haven
Mentor
Mentor

I would not waste my time writing what others have spent years developing to do what you want, my principal work is civil and spent 40 years doing it and just so many off the shelf packages available, Sewer and stormwater drainage to mention two. Water mains pressure pipes I have seen something just google I think its an add on for CIV3D.

 

I know I did watermain/sewer layouts on plan of subdivisions in lisp to produce the layouts then read into an analysis package. Producing full hydraulic analysis plan and long sections, stuff like obstruction clash checks.

 

Have a look at Civil site design, CIV3D, Carlson, Autodesk apps store.

 

Yes I do have a bias to Civil site design. In prior version was a 2 State sales manager.

 

 

 

Does it cost yes. 

 

 

0 Likes
Message 5 of 6

Anonymous
Not applicable

thanks for your reply. I don't mean to write a program to do hydraulic modeling which as you mentioned softwares are already available to do so. What i meant is to automate the process of producing the layout plans before sending it to the software for modeling, then upon receiving the shape files from the software to be able to automate the process of producing profiles, finalizing the autocad layout drawings, automatically mitigate clashes between utilities,..etc.

The above would apply to all wet utilities sewerage, storm water, water network, irrigation,..etc

So do you think autolisp would be sufficient to perform the required tasks or do you suggest .Net instead?

Thanks

0 Likes
Message 6 of 6

Sea-Haven
Mentor
Mentor

I will try to find the draw pline with offset its for subdivison layouts it draw straights being parallel to lot boundary and allows swapping of road side as you proceed it can be used for what you want. 

 

; draw offsets from points for random shape object making pline
; By Alan H AUG 2019


(defun ah:ploffs (/ offdir offd x pt1 pt2 pt3 oldsnap ssp)

  (defun drawline (/ ang pt3 obj)
    (setq ang (angle pt1 pt2))
    (if (= offdir "L")
      (setq pt3 (polar pt2 (+ ang (/ pi 2.0)) 10))
      (setq pt3 (polar pt2 (- ang (/ pi 2.0)) 10))
    )
    (setvar 'osmode 0)
    (command "line" pt1 pt2 "")
    (setq obj (entlast))
    (command "offset" offd obj pt3 "")
    (setq ssp (ssadd (entlast) ssp))
    (command "erase" obj "")
    (setq pt1 pt2)
  )

  (defun swapr-l (/)
    (if (= (strcase offdir) "L")
      (setq offdir "R")
      (setq offdir "L")
    )
    (setvar 'osmode oldsnap)
    (setq pt1 (getpoint "\nPick  next point"))
    (setq pt2 (getpoint "\nPick  next point"))
    (drawline)
  )


; starts here
; add side pick
  (setq oldsnap (getvar 'osmode))
  (setq ssp nil)

  (initget 6 "R L")
  (setq offdir (strcase (getstring "Right or  Left")))
  (setq offd (getreal "Enter offset distance"))


  (setq pt1 (getpoint "pick 1st point"))
  (setq ssp (ssadd))

  (initget 6 "1 2 3 4 5 6 7 8 9 0 a b c d e f g h i j k l m n o p q r s t u v w x y z")
  (while (setq pt2 (getpoint "\nPick  next point or [S Swap sides] Enter to Exit:<"))
    (cond
      ((= (type pt2) 'LIST) (drawline))
      ((= (type pt2) 'str) (swapr-l))  ; also calls drawlines
      ((= pt2 nil) (quit))
    )
    (setvar 'osmode oldsnap)
    (initget 6 "Swap")
  )

  (setq x 0)
  (repeat (- (sslength ssp) 1)
    (setvar 'filletrad 0)
    (command "fillet" (ssname ssp x) (ssname ssp (1+ x)))
    (setq x (1+ x))
  )

  (setq x 0)
  (command "pedit" (entlast) "Y" "J")
  (repeat (- (sslength ssp) 1)
    (command (ssname ssp x))
    (setq x (1+ x))
  )
  (command "" "")

  (princ)

)
(ah:ploffs)

 

screenshot307.png

When you see Pick next point or [S Swap sides] press enter to finish.

0 Likes