DataExtraction - writing data out to excel file

DataExtraction - writing data out to excel file

Moshe-A
Mentor Mentor
516 Views
1 Reply
Message 1 of 2

DataExtraction - writing data out to excel file

Moshe-A
Mentor
Mentor

Hi Guys,

 

i'm tying for some days to write data table from a drawing out to excel file (the second time,  DataLinkUpdate command) with no luck

this problem is only coming from DataExtraction command (when making simple link between a table and excel it works)

 

AutoCAD keep saying (from R2008 and all the way up):

 

1 object(s) found.
1 data link(s) do not allow their data to be written out.
0 data link(s) written out successfully.

 

i understand the error is due to 'allow writing to source file' but this switch is always ON and i did make sure it is on.

I also unlocked the the whole table.

 

it seems that autocad making a special link (through DXE file in which the link to excel is bound) and maybe the 'allow writing to source file'

there is OFF (did not found the way to edit it)

 

Can it be enable from VisualLisp?

 

Thanks in Advance

Moshe

 

0 Likes
517 Views
1 Reply
Reply (1)
Message 2 of 2

Moshe-A
Mentor
Mentor

i made some progress

 

lets say i have (in my current drawing) a datalink to excel file called 'EXCEL', 'allow writing to source file' is enable

 

(setq *dict* (dictsearch (namedobjdict) "ACAD_DATALINK"))

(entget (cdr (assoc 360 *dict*)))

 

((-1 . <Entity name: 7ffff706080>) (0 . "DATALINK") (5 . "200") (102 . "{ACAD_REACTORS") (330 . <Entity name: 7ffff706070>) (102 . "}") (330 . <Entity name: 7ffff706070>) (100 . "AcDbDataLink") (1 . "AcExcel") (300 . "") (301 . "Data Link\nexcel\nC:\\Users\\moshe\\Documents\\Drawing1.xls\nLink details: Entire sheet: Summary") (302 . "C:\\Users\\moshe\\Documents\\Drawing1.xls!Summary") (90 . 2) (91 . 68943873) (92 . 1) (170 . 2014) (171 . 12) (172 . 24) (173 . 18) (174 . 40) (175 . 3) (176 . 84) (177 . 3) (93 . 0) (304 . "") (94 . 0) (360 . <Entity name: 7ffff7060c0>) (305 . "CUSTOMDATA") (1 . "DATAMAP_BEGIN") (90 . 3) (300 . "ACEXCEL_UPDATEOPTIONS") (301 . "DATAMAP_VALUE") (93 . 2) (90 . 1) (91 . 67895297) (94 . 0) (300 . "") (302 . "") (304 . "ACVALUE_END") (300 . "ACEXCEL_CONNECTION_STRING") (301 . "DATAMAP_VALUE") (93 . 2) (90 . 4) (1 . "C:\\Users\\moshe\\Documents\\Drawing1.xls!Summary") (94 . 0) (300 . "") (302 . "") (304 . "ACVALUE_END") (300 . "ACEXCEL_SOURCEDATE") (301 . "DATAMAP_VALUE") (93 . 2) (90 . 8) (92 . 16) (310 . "DE070C00030018001300190010000000") (94 . 0) (300 . "") (302 . "") (304 . "ACVALUE_END") (309 . "DATAMAP_END"))

 

i disable  'allow writing to source file' 

 

and repeat (entget (cdr (assoc 360 *dict*)))

but the result database is identical

 

which dotted pair dxf code is   'allow writing to source file' ?

 

 

thanks

moshe

 

0 Likes