+ Reply to Thread
Results 1 to 6 of 6
  1. #1
    Forum Newbie
    Using
    AutoCAD 2011
    Join Date
    Oct 2010
    Posts
    5

    Question Create box that contains everything?

    Registered forum members do not see this ad.

    Is there a command or Lisp routine that creates a 3dbox which sides are adjacent to a drawing? Something like a 3d boundary-space that contains everything you might have created..

  2. #2
    Quantum Mechanic ReMark's Avatar
    Computer Details
    ReMark's Computer Details
    Operating System:
    Windows 7 Pro 64-bit
    Computer:
    Thinkmate
    Motherboard:
    Intel DX58SO2 LGA1366 X58
    CPU:
    Intel i7-960 Quad-core 3.20GHz 8MB cache
    RAM:
    12GB (3x4GB) PC3-106000 DDR3
    Graphics:
    nVidia Quadro K4200, 4GB GDDR5
    Primary Storage:
    150GB Velocipraptor 10,000 rpm
    Secondary Storage:
    none
    Monitor:
    Dell P24LLH - 24" wide screen LCD
    Discipline
    See details...
    ReMark's Discipline Details
    Occupation
    CAD Draftsman/Designer...chemical manufacturing.
    Discipline
    See details below.
    Details
    I work for a specialty chemical manufacturer. I do a little bit of everything from P&IDs to civil to architectural and structural.
    Using
    AutoCAD 2018
    Join Date
    Nov 2005
    Location
    Norwalk, CT USofA
    Posts
    46,380

    Default

    It doesn't sound familiar.
    "I have only come here seeking knowledge. Things they wouldn't teach me of in college." The Police

    Eat brains...gain more knowledge!

    I'm now a full member of the Society for the Promotion of Mediocrity in CAD. Standards? We don't need no stinkin' standards! Take whatever advice I offer and do the opposite.

  3. #3
    Senior Member
    Using
    not applicable
    Join Date
    Jan 2008
    Location
    Littleton Colorado USA
    Posts
    166

    Default

    16horse, you might try asking this question in the Autolisp forum. I'm pretty sure there is a lisp solution for it.

  4. #4
    Luminous Being
    Using
    Civil 3D 2016
    Join Date
    Dec 2005
    Location
    GEELONG AUSTRALIA
    Posts
    9,748

    Default

    EXTMAX & EXTMIN are the values of your drawing in a plan view not sure if theres extz

    (setq pt1 (getvar "extmin")
    (setq pt1 (getvar 'extmax")
    (command "rectang" pt1 pt2)

    then extrude or thickness

  5. #5
    Luminous Being
    Using
    Civil 3D 2016
    Join Date
    Dec 2005
    Location
    GEELONG AUSTRALIA
    Posts
    9,748

    Default

    Extmax & extmin gives you the bounding box values including z's -20,-20,-10 821,574,50

    (setq pt1 (getvar "extmax")) (setq pt1x (car pt1)) (setq pt1y (cadr pt1)) (setq pt1z (caddr pt1))
    (setq pt1new (list pt1x pt1y))
    (setq pt2new (list pt2x pt2y))
    rectang 2d points then extrude z height. can be done easy

  6. #6
    Senior Member
    Using
    not applicable
    Join Date
    Jan 2008
    Location
    Littleton Colorado USA
    Posts
    166

    Default

    Registered forum members do not see this ad.

    Based on BIGAL's idea, here's a simple lisp :

    Code:
    ; 3dbe.lsp - 3D bounding box using Extrude command
    
    (defun c:3dbe (/ osave ce pmax pmin pmaxx pmaxy pmaxz pminx pminy pminz)
    (setq osave (getvar "OSMODE"))
    (setvar "OSMODE" 0)
    (setq ce (getvar "CMDECHO"))
    (setvar "CMDECHO" 0)
    (setq pmax (getvar "EXTMAX"))
    (setq pmin (getvar "EXTMIN"))
    (setq pmaxx (car pmax) pmaxy (cadr pmax) pmaxz (caddr pmax))
    (setq pminx (car pmin) pminy (cadr pmin) pminz (caddr pmin))
    (command "._RECTANGLE" (list pminx pminy pminz) (list pmaxx pmaxy pminz))
    (command "._EXTRUDE" (entlast) "" (abs (- pmaxz pminz)) 0)
    (setvar "CMDECHO" ce)
    (setvar "OSMODE" osave)
    (princ)
    )

Similar Threads

  1. To create or not to create threads
    By Polanka in forum AutoCAD 3D Modelling & Rendering
    Replies: 3
    Last Post: 13th Nov 2009, 10:18 pm
  2. Can't Create DWF
    By YZ in forum AutoCAD Drawing Management & Output
    Replies: 3
    Last Post: 21st Sep 2009, 11:00 am
  3. Create DWF
    By FazBear in forum AutoLISP, Visual LISP & DCL
    Replies: 5
    Last Post: 30th Apr 2009, 05:59 pm
  4. how do i create this?
    By ctbuilder in forum AutoCAD Drawing Management & Output
    Replies: 12
    Last Post: 1st Jan 2008, 03:52 am
  5. Create a font?
    By J-factory in forum AutoCAD General
    Replies: 3
    Last Post: 1st Nov 2006, 12:21 am

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts