Jump to content

Recommended Posts

Posted

Does anybody have experience with reading Object Data?

I have "MAPBULKFEATURE" entities with data; I would like to read this data with lisp.

Posted

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.

Posted

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?

Posted

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)
)

Posted

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.

Posted

... 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)? :thumbsup:

 

Cheers

Posted

... You down with O[DD] (yeah you know me)? :thumbsup:

 

Ahahaha...

Posted

Thanks; I have enough stuff to try out these next days

Posted
Ahahaha...

 

*Tips hat*

 

I wondered if anyone would get the reference. :geek:

 

Ehhhehehe

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...