Jump to content

Recommended Posts

Posted

Hello everyone. I have trouble to split up one dwg into other dwg which object is only inside the boundary. I have done with this method: create boundary (by closed polygon) to which object I want to save-trim outside boundary-save as the modified dwg-undo to previous dwg (so i get back my original dwg objects) and repeat to the first step. Is there any lisp to solve my problem? It takes too much time with my traditional method. Thanks in advance.

  • 2 weeks later...
Posted

You can select objects you want and WBLOCK them into separate files...

Is this you are after?

  • Like 1
Posted

Rather then using polylines for selections you can use your current view. found here

https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/select-similar-for-current-window-view/td-p/848068

(defun GetScreenCoords ( / viewname viewdata vctr vwidth ctrx ctry xmin xmax ymin ymax)
(command "-view" "s" "tempview")
(setq viewname (tblobjname "view" "tempview")
      viewdata (entget viewname)
      vctr (cdr (assoc 10 viewdata))
      vwidth (cdr (assoc 41 viewdata))
      vheight (cdr (assoc 40 viewdata))
      ctrx (car vctr)
      ctry (cadr vctr)
)
(setq xmin (- ctrx (/ vwidth 2.0))
      xmax (+ ctrx (/ vwidth 2.0))
      ymin (- ctry (/ vheight 2.0))
      ymax (+ ctry (/ vheight 2.0))
)
(setq ptlist (list (list xmin ymin) (list xmax ymin) (list xmax ymax) (list xmin ymax)))
)

 

 

Posted

Have a look at "cookie cutter.lsp" and Marko's suggestion together.

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