Retrieve Text Value

Discussion in 'AutoCAD' started by Alan Henderson @ A'cad Solutions, Jan 31, 2005.

  1. BlankI am trying to write code to allow a user to select a piece of text -
    Even if the text is text, mtext, attribute inside block, text/mtext inside external reference, attribute inside block inside external reference.

    I can get the text if the entity is text, mtext or block attribute, but the same code doesn't work if it's inside an external reference.

    Thanks...
    Alan
     
    Alan Henderson @ A'cad Solutions, Jan 31, 2005
    #1
  2. Alan Henderson @ A'cad Solutions

    T.Willey Guest

    This seems to work on a mtext entity in an xref.

    Tim

    Command: (setq tmp1 (nentsel))

    Select object: (<Entity name: 7ebe7198> (392.358 557.532 0.0) ((1.0 0.0 0.0)
    (0.0 1.0 0.0) (0.0 0.0 1.0) (0.0 0.0 0.0)) (<Entity name: 7e968500>))

    Command: (entget (car tmp1))
    ((-1 . <Entity name: 7ebe7198>) (0 . "MTEXT") (330 . <Entity name: 7ebb9390>)
    (5 . "BBA4E8B") (100 . "AcDbEntity") (67 . 0) (410 . "Model") (8 .
    "NORT-005-M-2HVAC|E-HTEXT-EXH") (100 . "AcDbMText") (10 399.914 560.699 0.0)
    (40 . 9.0) (41 . 80.1875) (71 . 3) (72 . 5) (1 . "FE-5-31\\P120 CFM") (7 .
    "NORT-005-M-2HVAC|ROMANS") (210 0.0 0.0 1.0) (11 1.0 0.0 0.0) (42 . 58.2857)
    (43 . 24.0) (50 . 0.0) (73 . 1) (44 . 1.0))

    Command: (entget (car (last tmp1)))
    ((-1 . <Entity name: 7e968500>) (0 . "INSERT") (330 . <Entity name: 7e976a78>)
    (5 . "88CAA4E0") (100 . "AcDbEntity") (67 . 0) (410 . "Model") (8 . "XREF")
    (100 . "AcDbBlockReference") (2 . "NORT-005-M-2HVAC") (10 0.0 0.0 0.0) (41 .
    1.0) (42 . 1.0) (43 . 1.0) (50 . 0.0) (70 . 0) (71 . 0) (44 . 0.0) (45 . 0.0)
    (210 0.0 0.0 1.0))
     
    T.Willey, Jan 31, 2005
    #2
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.