Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 03/22/2021 in all areas

  1. that's a good suggestion Bigal , but if OP's company policy is anything like mine it's not only about location but also extension. My company uses 'block everything except...' where every $%^& single file has to be 'white listed' and even updates of a program can mess things up and complete app has to be white listed all over again. But hey , it might work... I'm in a constant state of cold war with my IT department , I think of something and when they find out they find a way to block it... if they really hate me all they have to do is switch to AutoCad LT (don't tell them that I said that!)
    2 points
  2. I'm not sure if Lee's Batte has a 'script' mode (no dialog) else you could try the epic's approach (erase purge insert change and saveas). Works for simple drawings like instrument loops and wire diagrams where no paper space is used. Else you would need to use steal of similar to import layouts as well. Easy to add progress etc if you know a little about lisp. (defun c:FlipFlop ( / doc sp) (init) (runit) (princ)) (defun init () (vl-load-com) (defun *error* (m)(princ (strcat "\nComputer says no : " m)) princ) (setq doc (vla-get-activedocument (vlax-get-acad-object)) sp (vla-get-modelspace doc)) ; (if (not (load "Lee's stuff" nil))(alert "Lee's stuff not loaded")) ) (defun runit ( / f l) (if (and (setq f (GetFolder "Where are your drawings?")) (vl-consp (setq l (alf f "*.dwg"))))(foreach d l (erase_all)(insert_dwg d)(do_your_stuff_here)(vla-saveas doc d)))) (defun insert_dwg (d / b) (if (vl-catch-all-error-p (setq b (vl-catch-all-apply 'vla-InsertBlock (list sp (vlax-3d-point 0 0 0) d 1.0 1.0 1.0 0.0)))) (princ (strcat "\n* error : " d " - " (vl-catch-all-error-message b))))(progn (vla-explode b)(vla-delete b))) (defun alf (f p) (if (and (= 'STR (type f)) (vl-file-directory-p (setq f (strcat (vl-string-right-trim "\\ "(vl-string-translate "/" "\\" f)) "\\")))) (apply 'append (cons (if (vl-directory-files f p) (mapcar '(lambda (x) (strcat f x)) (vl-directory-files f p))) (mapcar '(lambda (x) (alf (strcat f x) p)) (vl-remove ".." (vl-remove "." (vl-directory-files f nil -1)))))))) (defun GetFolder ( m / f s) (if (and (setq s (vlax-create-object "Shell.Application")) (setq f (vlax-invoke s 'browseforfolder 0 m 0 "")))(setq f (vlax-get-property (vlax-get-property f 'self) 'path)) (setq f nil))(vl-catch-all-apply 'vlax-release-object (list s)) (if f (strcat (vl-string-right-trim "\\" (vl-string-translate "/" "\\" f)) "\\"))) (defun erase_all () (vlax-for o sp (vl-catch-all-apply 'vla-delete (list o))) (vla-purgeall doc)) (defun create_txt (p s h) (entmake (list '(0 . "TEXT")(cons 10 p)(cons 1 s)(cons 50 0.0)(cons 40 h)(cons 72 1)(cons 73 2)(cons 11 p)))) ;;; call Lee's stuff here steal , batte ... whatever (defun do_your_stuff_here () ;;; just for example (create_txt (getvar 'viewctr) "FlipFlop was here" (/ (getvar 'viewsize) 20)) ) guess you could call it a script without using a script file
    1 point
  3. As BigAl says there are many different piping standards around the world. Take a look if these are of any use to you, there is more stuff further up that thread: https://www.cadtutor.net/forum/topic/12856-mampe-draughtsmen/page/2/?tab=comments#comment-109430
    1 point
  4. You need to advise where you are in the world so correct PIPE STD is met. I do not have any. ISO BS AS US etc
    1 point
  5. Yeah worked straight away. _CG_FLAG (1).dwg
    1 point
×
×
  • Create New...