Author Topic: Lisp to cut door and window openings in a wall?  (Read 7559 times)

0 Members and 1 Guest are viewing this topic.

Robb

  • Guest
Lisp to cut door and window openings in a wall?
« on: August 03, 2005, 03:31:37 PM »
Does anyone have a lisp to cut an opening in a wall 4" off a specified point or user specfied distance offset from wall/line) and a user specified width for the opening? or if even you can post something to get me started.

I have all my door blocks but I still have to manually offset/trim my lines to create the door openings before I insert the door blocks.

Thanks!

42

  • Bull Frog
  • Posts: 483
Lisp to cut door and window openings in a wall?
« Reply #1 on: August 03, 2005, 04:19:16 PM »
Forgive me if I'm missing something here, but if you are using ADT you can create doors and windows to your own requirements and insert them into a wall which will trim them automatically. You can specify in the insert process where the door is to end up.

All of your drawing in ADT can be carried out with inteligent objects, that is you can asign properties to them to create schedules etc.
Alastair Mallett Autodesk Certified Professional
Technical Director
Hunters South Architects

Robb

  • Guest
Lisp to cut door and window openings in a wall?
« Reply #2 on: August 03, 2005, 10:18:10 PM »
Sorry,

Yes I am using ADT 3.3 but on this particular project I am using plain vanilla autocad to produce these drawings. Actually I am the only one in my office that has Acad 2006 and Revit but everyone else is using plain autocad 2002.

V-Man

  • Bull Frog
  • Posts: 343
  • I exist therefore I am! Finally Retired!
Lisp to cut door and window openings in a wall?
« Reply #3 on: August 05, 2005, 07:57:51 AM »
Here is a simple lisp that will accomplish the task for you.

Code: [Select]

(defun drxerr (msg)
   (setq LAX (getvar "clayer"))
   (setvar "orthomode" ORT)
   (setvar "osmode" OSM)
   (setvar "pickbox" PKB)
   (setq *error* error_old)
   (princ "\nPlease try again.  ")
   (command "_.undo" "_end")
)
(defun c:DRX (/      LAX    ORT    OSM    pt0   pt1  pt2 pt3
pt4    pt5    pt0    ang1   ang2   ang3  dst1 dst2
doorwn doorw  doorw2
      )
  (command "_undo" "_g")
  (setq error_old *error* *error* drxerr) ;;save and establish error handler
  (setq LAX (getvar "clayer"))
  (setq ORT (getvar "orthomode"))
  (setq OSM (getvar "osmode"))
  (setq PKB (getvar "pickbox"))
  (setvar "pickbox" 4)
  (if (not *opngw)
    (setq *opngw 60.0)
  )
  (if (not *opngof)
    (setq *opngof 4.0)
  )
  (if (= *opngof 0.0)
    (setq *opngof 4.0)
  )
  (setvar "osmode" 33)
  (graphscr)
  (setq pt0 (getpoint "\nSelect offset point: "))
  (princ "\nDistance from offset point <")
  (princ *opngof)
  (setq opngof (getdist ">: "))
  (if (not opngof)
    (setq opngof *opngof)
    (setq *opngof opngof)
  )
  (setvar "osmode" 512)
  (setq pt2 (getpoint pt0
     "\nSelect approximate jamb location: "
   )
  )
  (setq ang2 (angle pt0 pt2)
pt1  (polar pt0 ang2 opngof)
  )
  (setvar "osmode" 128)
  (setq pt3 (getpoint pt1
     "\nSelect opposite face to be opened: "
   )
  )
  (princ "\nEnter opening width <")
  (princ *opngw)
  (setq opngw (getdist ">: "))
  (if (not opngw)
    (setq opngw *opngw)
    (setq *opngw opngw)
  )
  (setvar "osmode" 0)
  (setq ang1 (angle pt1 pt3)
ang3 (fix (- ang1 ang2))
dst1 (distance pt1 pt3)
dst2 (distance pt1 pt2)
  )
  (setq pt4 (polar pt1 ang2 opngw))
  (setq pt5 (polar pt4 ang1 dst1))

  (command
    "break" pt4 pt1 "break" pt5 pt3 "line" pt1 pt3 "" "line" pt4 pt5 "")

  (setvar "layer" LAX)
  (setvar "orthomode" ORT)
  (setvar "osmode" OSM)
  (setvar "pickbox" PKB)
(setq *error* error_old)
   (command "._undo" "_end")
  (princ)
)
AutoCAD 9 - 2023, AutoCADMap 2008 - 2010, Revit 2012 - 2022, Autocad Civil 3D 2023

AVCAD

  • Guest
Lisp to cut door and window openings in a wall?
« Reply #4 on: August 08, 2005, 04:35:24 PM »
I hate ADT doors, windows, walls....hell just the program..

It does nothing but cause problem to other trades. Proxy images, ARX objects..sigh.

If the files would be compatible with its sister program AUTOCAD it wouldnt be bad but seeing as when get the files in DWG format, they have embeded colors.

So changing the colors of layers doesnt change the color!! the hard coded color still take presidence.

then you have to burst it..and explode it...and burst it again to get to the base object to change to object to bylayer color instead of hard coded. Then what happens is that the objects such as doors, windows, walls...like to act funky and the walls will become full walls where doors should be, doors will disappear and windows will disappear  makeing life very difficult.

Should have put this in the vent section huh... :?

Amsterdammed

  • Guest
Lisp to cut door and window openings in a wall?
« Reply #5 on: August 08, 2005, 08:49:08 PM »
You should not explode entities made by an application. If you want to edit a block, like turning all it’s entities to colour “bylayer” just refedit it. A lisp to change the sub entities would be even better, but never explode it.

Bernd

daron

  • Guest
Lisp to cut door and window openings in a wall?
« Reply #6 on: August 09, 2005, 07:30:00 AM »
ADT objects are different. They are not just a regular block. They have more intellligence than that. There is however a dialog that allows you to change all properties globally or individually and there are objects for cutting purposes if you have a wall that a door can't cut through, like a canted wall. AVCAD, sounds like you need to get Paul Aubin's book "Mastering ADT". ADT is a great product, except maybe for trades as you say. Probably another reason I don't have it here. However, I get lots of plans from our builders that are in ADT and I have no problem with seeing the objects.

AVCAD

  • Guest
Lisp to cut door and window openings in a wall?
« Reply #7 on: August 18, 2005, 11:00:07 AM »
Its not a problem with "seeing" the object. I can view them just fine. With the few occasions when the ceiling doesnt show up unless the file is saved with the ceiling layers on...its weird.

The problem is needing the object to bylayer color. Not hard colored. When they are hard colored you cant change the color of these object untill you get to the base objects.

Refedit would work...on like 1 or 2 objects but when you working in plans that span an entire Island in Dubi or a convention center that is like 150,000sq/ft its just not possible. Unless there is a lisp that will do it, which would be great.

If there is an easier way I would love to hear it. Right now what has been working is...

burst everything a fewtimes, Xplode, burst some more and then explode everything, burst a few more times. usually this works very well but there are those times....

Proxy images are a who other story...these objects like furniture LOVE to disappear on me.

LE

  • Guest
Re: Lisp to cut door and window openings in a wall?
« Reply #8 on: August 19, 2005, 11:14:15 AM »
Quote from: Robb
Does anyone have a lisp to cut an opening in a wall 4" off a specified point or user specfied distance offset from wall/line) and a user specified width for the opening? or if even you can post something to get me started.

I have all my door blocks but I still have to manually offset/trim my lines to create the door openings before I insert the door blocks.

Thanks!


Hi Robb,

I have a VLX with two routines to install doors and windows in plan view, I have no idea on how to upload the file here, let me know if you are interested.... and where to send it...

Well, thanks to CAB... here is the link, hope would work

http://www.theswamp.org/lilly_pond/luisesq/doorwindow.zip?nossi=1

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Lisp to cut door and window openings in a wall?
« Reply #9 on: August 19, 2005, 07:02:13 PM »
See the header at the top of this page, select "Lilly Pond"
Quote
File Storage: [  Lilly Pond

Enter name and password, create your sub folder.
Once file is uploaded right click on the new file & "Copy Link"
Then create your post, right click & paste the url
You can use the URL button as well
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.