Jump to content

Recommended Posts

Posted

Hello!

 

Not new to Autocad but new to Cadtutor....I have receive a drawing choc full of wipeouts (arg!). What's worse is the wipeout frames are acting as necessary linework so I cannot just delete them through Qselect.

 

Is there a way to convert wipeouts to polyline regions? They are on many different layers with differing linetypes so I want to retain all those characteristics.

 

Thanks!

Posted

Explode the wipeouts.

Use ._Pedit to convert to polylines.

Use ._Region to convert to regions.

Posted

Use Region on the Wipeout, erase the Wipeout.

Posted

rkmcswain - exploding the wipeouts removes their layer sensitive characteristics (linetypes, color, etc).

 

rkent - using the region command did not work on the wipeouts. "1 closed, degenerate or unsupported object rejected"

Posted

Command: BOUNDARY

Pick internal point: Selecting everything... (the "everything" was a wipeout)

Selecting everything visible...

Analyzing the selected data...

Analyzing internal islands...

Pick internal point:

BOUNDARY created 1 polyline

 

When done erase the wipeout.

 

I just tested it. It works.

Posted

ReMark,

 

Thanks for the tip..I love this command. However, this drawing has hundreds of wipeout regions..this is not a practical way to quickly change them all.

Posted (edited)
ReMark,

 

Thanks for the tip..I love this command. However, this drawing has hundreds of wipeout regions..this is not a practical way to quickly change them all.

 

Changing them all at once is a tough request... Have you considered changing them one at a time, really fast instead? :wink:

 

Enjoy the freebie:

 

;;;--------------------------------------------------------------------;
;;; c:WIPEOUT->REGION
;;; Courtesy of RenderMan, CADTutor.net
;;;--------------------------------------------------------------------;
;;; Description:
;;; Convert all wipeouts within a given drawing to regions.
;;;--------------------------------------------------------------------;
;;; Exit function:
(defun WIPEOUT->REGION:Exit  (msg)
 (cond ((not msg))                                                     ; Normal exit
       ((member msg '("Function cancelled" "quit / exit abort")))      ; <esc> or (quit)
       ((princ (strcat "\n  <!>  Error: " msg "  <!> "))))             ; Fatal error, display it
 (WIPEOUT->REGION:Quit))
;;;--------------------------------------------------------------------;
;;; Quit function:
(defun WIPEOUT->REGION:Quit  ()
 (setvar 'cmdecho *oldCmdecho*)
 (setq *oldCmdecho* nil)
 (setq *error* *oldError* *oldError* nil)
 (vla-endundomark *activeDoc*)
 (princ))
;;;--------------------------------------------------------------------;
;;; Main function:
(defun c:WIPEOUT->REGION  (/ ss)
 (vl-load-com)
 (vla-startundomark
   (cond (*activeDoc*)
         ((setq *activeDoc*
                 (vla-get-activedocument (vlax-get-acad-object))))))

 ;; Error checking
 (setq *oldError* *error* *error* WIPEOUT->REGION:Exit)
 (setq *oldCmdecho* (getvar 'cmdecho))
 (setvar 'cmdecho 0)

 ;; Main code
 (if (and (setq ss (ssget "_x" '((0 . "WIPEOUT"))))
          (setq ss (ssget "_x")))
   ((lambda (i / e v visList wipList mn mx c)
      (while (setq e (ssname ss (setq i (1+ i))))
        (if (/= "WIPEOUT" (strcase (cdr (assoc 0 (entget e)))))
          (progn
            (vla-put-visible
              (setq v (vlax-ename->vla-object e))
              :vlax-false)
            (setq visList (cons v visList)))
          (setq wipList (cons e wipList))))
      (foreach w  wipList
        (vla-getboundingbox
          (setq v (vlax-ename->vla-object w))
          'mn
          'mx)
        (setq c
               (mapcar '*
                       (mapcar '+
                               (setq mn (vlax-safearray->list mn))
                               (setq mx (vlax-safearray->list mx)))
                       '(0.5 0.5 0.5)))
        (vl-cmdf "._boundary" c "")
        (vl-cmdf "._matchprop" w (entlast) "")
        (vl-cmdf "._region" "")
        (vla-delete v))
      (foreach o  visList
        (vla-put-visible o :vlax-true)))
     -1)
   (prompt "\n  <!>  No Wipeouts Detected in Currect Drawing  <!> "))
 (WIPEOUT->REGION:Quit))

 

 

Perhaps the moderators will find this post 'constructive'... I digress. : eyeroll:

Edited by BlackBox
Edit1: Forgot mn, mx variable calls within Lambda, Edit2: removed redundant *cancel* setting(s)
Posted

I hope the Wipeout isn't irregularly shaped so the midpoint of the boundingbox doesn't fall within the boundary of the wipeout (eg. the wipeout in the shape of a "U").

Posted
rkmcswain - exploding the wipeouts removes their layer sensitive characteristics (linetypes, color, etc).

 

 

Sorry guy... I was just doing a quick brain dump.... Didn't realize props were not retained...

Looks like you got plenty of other options... :-)

  • 2 weeks later...
Posted

Thank you everyone for taking the time to respond. Really appreciate it.

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...