Emmanuel Delay Posted June 18, 2015 Posted June 18, 2015 Does anybody have experience with reading Object Data? I have "MAPBULKFEATURE" entities with data; I would like to read this data with lisp. Quote
tombu Posted June 18, 2015 Posted June 18, 2015 You need to have Map to have the Map lisp functions like "ade_odgetfield". Since the data is stored differently everywhere offering code probably wouldn't help. Our GIS folk keep revising how they store it so I have to keep revising my code. Quote
Emmanuel Delay Posted June 18, 2015 Author Posted June 18, 2015 Yes, I have Autocad Map 3D 2015. This prints nil. (defun c:test ( / mo ) (setq mo (car (entsel))) (princ (ade_odgettables mo)) (princ) ) Am I missing something? Quote
tombu Posted June 18, 2015 Posted June 18, 2015 Try: (defun c:test ( / mo tbl1 bf) (setq mo (car (entsel)) tbl1 (car (ade_odgettables mo)) ;First_Table_Assigned_to_Object bf (ade_odgetfield mo tbl1 "MAPBULKFEATURE" 0) ;the object data for the MAPBULKFEATURE maybe? ) (princ bf) (princ) ) Quote
Commandobill Posted June 18, 2015 Posted June 18, 2015 I wrote this a couple years back, it find everythings with map data and prints it to a specified CSV with coordinates. You could always change it for your needs. Quote
BlackBox Posted June 18, 2015 Posted June 18, 2015 ... And for WHEN you get tired of OD bloating your drawings: (defun c:ODD () (c:ObjectDataDelete)) (defun c:ObjectDataDelete (/ odTableName i n) (princ "\rOBJECTDATADELETE ") (if (and (setq odTables (ade_odtablelist)) (setq i (length odTables)) (setq n 0) (princ "\nWorking, please wait... ") (princ) ) (progn (foreach odTableName (ade_odtablelist) (ade_oddeletetab odTableName) (setq n (1+ n)) ) (princ "Done. ") (prompt (strcat "\nRemoved " (itoa n) " of " (itoa i) " object data table" (if (= 1 i) ". " "s. " ) ) ) ) (prompt "\n** No object data tables found ** ") ) (princ) ) ;; if not being loaded into map-enabled application (if (not ade_odtablelist) ;; disabled these functions (setq c:ODD (setq c:ObjectDataDelete nil)) ) (princ) ... You down with O[DD] (yeah you know me)? Cheers Quote
Commandobill Posted June 18, 2015 Posted June 18, 2015 ... You down with O[DD] (yeah you know me)? Ahahaha... Quote
Emmanuel Delay Posted June 19, 2015 Author Posted June 19, 2015 Thanks; I have enough stuff to try out these next days Quote
BlackBox Posted June 19, 2015 Posted June 19, 2015 Ahahaha... *Tips hat* I wondered if anyone would get the reference. Ehhhehehe Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.