How to convert from ssget to Dxf data

Discussion in 'AutoCAD' started by Adesu, Oct 6, 2004.

  1. Adesu

    Adesu Guest

    Is it possible to convert data from ssget to dxf data ?

    _$ (setq ss (ssget "x" '((0 . "TEXT"))))
    <Selection set: 8>

    $ (setq info (entget (car (entsel))))
    ((-1 . <Entity name: 14bb828>) (0 . "TEXT") (330 . <Entity name: 14bb0f8>)
    (5 . "10D") (100 . "AcDbEntity") (67 . 0) (410 . "Model") (8 . "logo") (100
    .. "AcDbText") (10 1108.88 280.709 0.0) (40 . 2.0) (1 . "Adesu") (50 . 0.0)
    (41 . 1.0) (51 . 0.0) (7 . "Standard") (71 . 0) (72 . 0) (11 0.0 0.0 0.0)
    (210 0.0 0.0 1.0) (100 . "AcDbText") (73 . 0))
    _$
     
    Adesu, Oct 6, 2004
    #1
  2. Use the ASSOC type.
    Wil be than (setq xx (assoc 8 info) result = (8 . "logo")
    With CAR and CDR you can extract the values like:
    (car xx) = 8
    (cdr xx) = "logo"

    Hope it helps.

    Jan
     
    Jan van de Poel, Oct 6, 2004
    #2
  3. Adesu

    Adesu Guest

    Sorry Jan, not like that,I mean
    from data (setq ss (ssget "x" '((0 . "TEXT")))) then convert to

    ((-1 . <Entity name: 14bb828>) (0 . "TEXT") (330 . <Entity name: 14bb0f8>)
    (5 . "10D") (100 . "AcDbEntity") (67 . 0) (410 . "Model") (8 . "logo")
    (100 . "AcDbText") (10 1108.88 280.709 0.0) (40 . 2.0) (1 . "Adesu") (50 .
    0.0)
    (41 . 1.0) (51 . 0.0) (7 . "Standard") (71 . 0) (72 . 0) (11 0.0 0.0 0.0)
    (210 0.0 0.0 1.0) (100 . "AcDbText") (73 . 0))
     
    Adesu, Oct 6, 2004
    #3
  4. Adesu

    Steve Jones Guest

    Adesu,

    Something like this?

    (setq ss (ssget "x" '((0 . "TEXT"))))
    (setq n (sslength ss))
    (setq cnt 0)
    (repeat n
    (setq ent (ssname ss cnt))
    (setq dxf (entget ent))
    (princ dxf)
    (setq cnt (+ 1 cnt))
    )

    Steve
     
    Steve Jones, Oct 6, 2004
    #4
  5. Adesu

    Adesu Guest

    Hi Steve,yes I want like that,as below is enough and thanks a lot

    (setq ss (ssget "x" '((0 . "TEXT"))))
    (setq cnt 0)
    (setq ent (ssname ss cnt))
    (setq dxf (entget ent))
     
    Adesu, Oct 7, 2004
    #5
  6. Adesu

    Steve Jones Guest

    Adesu,

    That will only return the 1st object in the selection set.
    Is that what you want?
    If so,

    (setq ss (ssget "x" '((0 . "TEXT"))))
    (setq ent (ssname ss 0))
    (setq dxf (entget ent))

    will do.

    Steve
     
    Steve Jones, Oct 7, 2004
    #6
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.