Jump to content

Recommended Posts

Posted

hey

 

can someone please help me out with my issue?

i have to create dxf file (in R12 version) from selected layers.

at the moment i am using this lsp routine ( bellow ), which is very basic and it only creates block file from which i then create dxf.

now i want a lsp to create dxf directly and it saves file on desktop.

hope i was clear enough.

 

(defun c:linije ()

(command "LAYER" "SET" "AA_CEV" "")

(command "layer" "freeze" "*" "")

(command "layer" "thaw" "AA_PRIMAR_COAX_ZEM" "")

(command "layer" "thaw" "AA_PRIMAR_COAX_ZRAK" "")

(command "layer" "thaw" "AA_SEK_COAX_ZEM" "")

(command "layer" "thaw" "AA_SEK_COAX_ZRAK" "")

(command "wblock" "linije_tel" "" "0,0" "all" "")

)

Posted

Once you isolate your layers you could use something similar to this

(setq ss (ssget))
(command "dxfout" "" "o" ss "" "v" "R12" "" )

 

If you want to select everything on the layers prefixed with AA_ , this might be easier... you don't need to isolate the layers first

(setq ss (ssget "X" '((8 . "AA_*"))))
(command "dxfout" "" "o" ss "" "v" "R12" "" )

Posted

thanks ipseifert, you just made it easier for me.

Posted

one quick question. can i assign exactly those objects on layers listed above to ss? im having problems doing that.

Posted

yes, this is it. i have multiple AA_ layers and i need just those listed above.

thanks again.

Posted

If I understand your question...

This should make a selection set of all the entities on the 4 layers you have listed above

(setq ss (ssget "X" '((8 . "AA_PRIMAR_COAX_ZEM,AA_PRIMAR_COAX_ZRAK,AA_SEK_COAX_ZEM,AA_SEK_COAX_ZRAK"))))

 

this is in response to post #4... original was deleted

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