Jump to content

Recommended Posts

Posted

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)

 

)

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...