+ Reply to Thread
Results 1 to 6 of 6
  1. #1
    Junior Member
    Using
    Map 3D 2011
    Join Date
    Nov 2008
    Posts
    10

    Default creating dxf file from selected layers

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

  2. #2
    Forum Deity
    Using
    Civil 3D 2008
    Join Date
    Sep 2006
    Location
    Pittsburgh, PA, USA
    Posts
    3,581

    Default

    Once you isolate your layers you could use something similar to this
    Code:
    (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
    Code:
    (setq ss (ssget "X" '((8 . "AA_*"))))
    (command "dxfout" "" "o" ss "" "v" "R12" "" )

  3. #3
    Junior Member
    Using
    Map 3D 2011
    Join Date
    Nov 2008
    Posts
    10

    Default

    thanks ipseifert, you just made it easier for me.

  4. #4
    Junior Member
    Using
    Map 3D 2011
    Join Date
    Nov 2008
    Posts
    10

    Default

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

  5. #5
    Junior Member
    Using
    Map 3D 2011
    Join Date
    Nov 2008
    Posts
    10

    Default

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

  6. #6
    Forum Deity
    Using
    Civil 3D 2008
    Join Date
    Sep 2006
    Location
    Pittsburgh, PA, USA
    Posts
    3,581

    Default

    Registered forum members do not see this ad.

    If I understand your question...
    This should make a selection set of all the entities on the 4 layers you have listed above
    Code:
    (setq ss (ssget "X" '((8 . "AA_PRIMAR_COAX_ZEM,AA_PRIMAR_COAX_ZRAK,AA_SEK_COAX_ZEM,AA_SEK_COAX_ZRAK"))))
    <note>this is in response to post #4... original was deleted

Similar Threads

  1. Unable To Transmit Selected Drawing File
    By Small Fish in forum AutoCAD General
    Replies: 4
    Last Post: 19th Aug 2010, 11:45 pm
  2. Command: _qsave Unable to transmit selected drawing file.
    By The Courage Dog in forum AutoCAD General
    Replies: 9
    Last Post: 27th Jan 2010, 11:37 pm
  3. Toggle Selected Layers/Objects?
    By etotheo in forum AutoCAD Beginners' Area
    Replies: 3
    Last Post: 16th Jun 2008, 08:53 pm
  4. Creating Layers
    By mhead in forum AutoCAD Beginners' Area
    Replies: 3
    Last Post: 10th Apr 2008, 05:19 am
  5. updating block from selected file
    By driutheman in forum AutoCAD General
    Replies: 2
    Last Post: 7th Apr 2006, 09:17 am

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts