Search the Community
Showing results for tags 'fms'.
-
Creating an exterior gross poly line around the footprint of building
stapleyneil posted a topic in AutoLISP, Visual LISP & DCL
I am attempting to create a list that will place a poly line representing the footprint of a building/floor. With the ultimate aim to represent the gross exterior and gross interior if a floor. I am able with ease place the interior gross polyline but am having difficulties with the exterior as I have to use an xref of the architectural drawing and the boundary function doesn't like all the internal islands so it hangs up CAD. This is only my second attempt at creating a script. Does anyone know of a quicker way? (DEFUN C:EXGR (/) (COMMAND "LAYON") ;;;;TURNS ALL LAYERS ON;;;; (COMMAND "LAYTHW") ;;;;UNFREEZES ALL LAYERS;;; (COMMAND "LAYER" "M" "EX-GROSS" "") ;;;;CREATES A LAYER NAMED IN-GROSS AND MAKES IT CURRENT;;;;;; (COMMAND "LAYER" "OFF" "A-AREA,ARCH|A-ANNO-GRID,A-AREA-IDEN,DEFPOINTS,ARCH|A-FLOR,FURN|A-FURN,FURN|A-FURN-CHAR,FURN|A-FURN-PNLS,FURN|A-FURN-WKST,ARCH|A-EQPM,ARCH|A-MILL" "") ;;;;TURNS OFF ALL NONE ESSENTIAL LAYERS LISTED IN "";;;; (COMMAND "LAYER" "F" "A-AREA,A-AREA-IDEN,ARCH|A-ANNO-GRID,DEFPOINTS,ARCH|A-FLOR,FURN|A-FURN,FURN|A-FURN-CHAR,FURN|A-FURN-PNLS,FURN|A-FURN-WKST,ARCH|A-EQPM,ARCH|A-MILL" "") ;;;;TURNS OFF ALL NONE ESSENTIAL LAYERS LISTED IN "";;;; (SETQ A (GETPOINT "\nENTER FIRST POINT: ")) ;;;;SELECTS THE FIRST RECTANGLE POINT;;;; (SETQ B (GETPOINT "\nENTER SECOND POINT: ")) ;;;;SELECTS THE SECOND RECANGLE POINT;;; (COMMAND "RECTANG" A B "") ;;;;PLACES THE RECTANGLE;;;;; (SETQ E (GETPOINT "\nENTER THIRD POINT: ")) (SETQ f (GETPOINT "\nENTER FOUTH POINT: ")) (COMMAND "PLINE" E F "") (SETQ C (getpoint "\nPick internal point: ")) ;;;;SELECTS THE INTERNAL AREA OF THE RECTANGLE;;;; (command "_.-boundary" C "") ;;;;INITIATES THE BOUNDARY COMMAND;;;;; (COMMAND "LAYER" "OFF" "A-XREF,A-AREA|A-WALL" "") ;;;;SWITCHES OFF SPACE POLYLINES;;;; (setq D (entsel "\nSELECT THE POLY YOU WANT TO DESIGNATE AS THE INTERIOR GROSS: ")) ;;;;SELECTS THE POLYLINE YOU WISH TO DESIGNATE AS THE INTERNAL POLYLINE;;;;; (command "_.chprop" D "" "LA" "DEFPOINTS" "") ;;;CHANGES THE SELECTED POLYLINE TO LAYER DEFPOINTS;;;;;; (COMMAND "CLAYER" "0") ;;;;SETS THE CURRENT LAYER TO 0;;;;; (COMMAND "LAYDEL" "N" "EX-GROSS" "" "Y") ;;;;DELETES ALL ITEMS ON EX-GROSS LAYER;;;;;; (COMMAND "LAYON") (COMMAND "LAYTHW") ;;;;TURNS ON AND FREEZES ALL THE LAYERS;;;;;;; (PRINC) )