Jump to content

To split up dwg into multiple files


Ibrakadabra

Recommended Posts

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.

Link to comment
Share on other sites

  • 2 weeks later...

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

 

 

Link to comment
Share on other sites

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