stapleyneil Posted February 21, 2015 Posted February 21, 2015 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) ) Quote
SLW210 Posted February 23, 2015 Posted February 23, 2015 Please read the Code Posting Guidelines and edit your post to include the Code in Code Tags. Quote
BIGAL Posted February 24, 2015 Posted February 24, 2015 After add post codes can you post sample dwg. Quote
hanhphuc Posted February 25, 2015 Posted February 25, 2015 i think one of this PLINETOOLS has an outline tool by Marko Ribar Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.