Jump to content

Need to export each solid as separate dwg, dxf or 3ds file format


Recommended Posts

Posted (edited)
11 hours ago, ADSK2007 said:

marko_ribar

 

Amazing :) Thank you marko. How do I save as 3ds format?

` ;  `  replace the sign   

 

 

;ss (ssget "_X" '((0 . "*POLYLINE") (-4 . "&=") (70 . 8)))         ; polyline object
          ss (ssget "_X" '((0 . "*SOLID") ))                                ; solid 

Edited by thecocuk07
Posted (edited)

 

.

Edited by thecocuk07
Posted (edited)
4 hours ago, thecocuk07 said:

hi marko  , 

 

It records only one object from every layer

 

exp ;  layer ,      charlie  , andy , brady      ,,,,,,,, 10 object have  

 

charlie000

charlie001

charlie002.....

 

andy000

andy001

andy002....

 

 

 

(defun c:WBP ( / c_doc o_arr ss o_lst cnt fname)
    (setq c_doc (vla-get-activedocument (vlax-get-acad-object))
          o_arr (vlax-make-safearray vlax-vbobject '(0 . 0))
          ss (ssget "_X" '((0 . "*SOLID") ))
    );end_setq

    (repeat (setq cnt (sslength ss))
      (setq o_lst (cons (vlax-ename->vla-object (ssname ss (setq cnt (1- cnt)))) o_lst))
    );end_repeat
    
    (setq cnt 0)
    
    (foreach obj o_lst
      (setq sso (vla-add (vla-get-selectionsets c_doc) "PLO")
            fname (strcat (getvar 'dwgprefix) (cdr (assoc 8 (entget (vlax-vla-object->ename obj)))) (itoa cnt) ".dwg")
      );end_setq
      (vlax-safearray-put-element o_arr 0 obj)
      (vla-additems sso o_arr)
      (vla-wblock c_doc fname sso)
      (vla-delete sso)
      (setq cnt (1+ cnt))
    );end_foreach  
);end_defun

charlie0

charlie1

charlie2.....

 

andy3

andy4

andy5

Edited by thecocuk07
Posted (edited)

.

 

 

Edited by thecocuk07

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