Empty DXF group value

Hi,
I try to retrieve block attributes from selected block.
I use entnext and vle-entget on block to search for attributes. I search for dxf grope (0 . ATTRIB) and retrieve dxf group (1 . "Value").
My drawing have block with multiple lines attributes and normal attributes. Also dwg file created from drawing template (dwt) with block in paperspace. So block with all data comes from dwt file.
All multiple lines attributes dxf group (1 . ) is empty, but block have data in these attributes and all normal attributes have data in (1 . "Value").
If I open attribute editor and press button to edit multiple line attribute and press ok (with no changes), now I can retrieve dxf group (1 . "Value") with value from attribute I have opened for edit.

I guess it is because block comes from dwt file. Is it true? And how it works?
CAD software shows block multiple line attributes, but vle-entget can't retrieve it if attribute is not edited in dwg file?

Comments

  • Dear,

    indeed, sounds a bit strange ...
    can you open a SupportRequest, add your dwt/dwg file there and a bit Lisp code so that we can try to reproduce (and fix) the issue ?

    many thanks in advance & many greetings !

  • Hi moses,
    I tried it on BricsCAD and AutoCAD Civil 3D. Both have the same result. So it is not BricsCAD only problem.

    I done more testing using BricsCAD and found it will only happen with my old template file created using AutoCAD. If I open template file in BricsCAD and save it as new template file. And create a new drawing from new template file I can retrieve attribute data. So it is problem with my old template file.


    If some one interested.

    If I create new dwg from my old template file and save it. Then I run this lisp

    (defun c:runTest ( / )
      (setq ent (car (entsel)))
      (while
        (and
          (setq ent (entnext ent))
          (= "ATTRIB" (vle-entget 0 ent))
        )
        (progn
          (princ (entget ent))
          (princ "\n")
        )
      )
    )
    

    and select block in the file with multiple lines attribute I get

    ((-1 . <Entity name: 4e7bce0>) (0 . ATTRIB) (5 . 405B) (330 . <Entity name: 4e7bca0>) (100 . AcDbEntity) (67 . 1) (410 . 418X418) (8 . 0) (370 . -1) (100 . AcDbText) (10 295.415468383799 47.429937895512 0.0) (40 . 2.0) (1 . ) (50 . 0.0) (41 . 1.0) (51 . 0.0) (7 . Standard) (71 . 0) (72 . 0) (11 295.415468383799 47.6704378515698 0.0) (210 0.0 0.0 1.0) (100 . AcDbAttribute) (2 . ORGANIZATORIUS) (70 . 0) (73 . 0) (74 . 2) (280 . 0) (101 . Embedded Object) (10 295.415468383799 47.6704378515698 0.0) (40 . 2.0) (41 . 51.5145397321162) (46 . 14.8427203474375) (71 . 4) (72 . 5) (1 . Data) (7 . Standard) (210 0.0 0.0 1.0) (11 1.0 0.0 0.0) (42 . 50.4844844844845) (43 . 13.3740910222392) (50 . 0.0) (73 . 1) (44 . 1.0))

    Multiple line attribute have (101 . Embedded Object) dxf group and more groups with second (1 . Value) group which have attribute data, but first (1 . ) are empty. If I close new dwg file and open it again and run lisp, i will get

    ((-1 . <Entity name: 5ccd7280>) (0 . ATTRIB) (5 . 405B) (330 . <Entity name: 5ccd7240>) (100 . AcDbEntity) (67 . 1) (410 . 418X418) (8 . 0) (370 . -1) (100 . AcDbText) (10 295.415468383799 46.6704378515698 0.0) (40 . 2.0) (1 . Data) (50 . 0.0) (41 . 1.0) (51 . 0.0) (7 . Standard) (71 . 0) (72 . 0) (11 295.415468383799 47.6704378515698 0.0) (210 0.0 0.0 1.0) (100 . AcDbAttribute) (2 . ORGANIZATORIUS) (70 . 0) (73 . 0) (74 . 2) (280 . 0) (101 . Embedded Object) (10 295.415468383799 47.6704378515698 0.0) (40 . 2.0) (41 . 51.5145397321162) (46 . 14.8427203474375) (71 . 4) (72 . 5) (1 . Data) (7 . Standard) (210 0.0 0.0 1.0) (11 1.0 0.0 0.0) (42 . 50.4844844844845) (43 . 13.3740910222392) (50 . 0.0) (73 . 1) (44 . 1.0))

    First (1 . Data) have attribute data.

    So it is weird bug which only happens with old template file and only if drawing just created from it. If drawing is opened for second time, here are no bug.

  • If you run the _audit command does that fix it?

  • No, audit do not fix it. But I don't need to fix it any more as it is only because of bad template file.

  • Dear Donatas,

    indeed, as you described, it seems to be the case that older dwg format versions trigger a problem here (for both systems);
    it might be the best option to save your template files as DWG 2010 or 2013 versions
    (or simply save the "drawing1" created with such a template under the original "template.dwt" file name;
    also, see Settings, there you can define your "default save" version)

    many greetings !

This discussion has been closed.