Results 1 to 4 of 4

Thread: Accessing embedded object data

  1. #1
    Member
    Join Date
    2006-12
    Posts
    25
    Login to Give a bone
    0

    Default Accessing embedded object data

    My company just got a few huge GIS base map file full of polylines and no text for a few counties. Navigating it for the linework you need is an ordeal, especially if you're not familiar with the area. There is data stored within the polylines however, I've attached an image of the properties pane to clarify. I'm not familiar with dictionary entities, but I don't think this applies. I did a (ssget '((0 . "DICTIONARY"))) and it returned nil, but I could still be wrong, sure.

    What I would simply like to do is write a routine to prompt for a string (street name), wildcard search the STREETNAME field for matches, add those matches to a selection set and perform a zoom object on that set. That plan might need tweaking, but that's where I'd start.

    An (entget (car (entsel))) on the polyline in the image returns this data, so I am unsure of how to proceed:
    Code:
    ((-1 . <Entity name: 7d4a6140>) (0 . "LWPOLYLINE") (5 . "6E1B0") 
    (102 . "{ACAD_XDICTIONARY") (360 . <Entity name: 7d4a6148>) (102 . "}") (330 . 
    <Entity name: 7bd9acf8>) (100 . "AcDbEntity") (67 . 0) (410 . "Model") (8 . 
    "PC_Roads") (100 . "AcDbPolyline") (90 . 17) (70 . 0) (43 . 0.0) (38 . 0.0) (39 
    . 0.0) (10 6.75329e+006 2.06806e+006) (40 . 0.0) (41 . 0.0) (42 . 0.0) (10 
    6.75328e+006 2.06813e+006) (40 . 0.0) (41 . 0.0) (42 . 0.0) (10 6.75328e+006 
    2.06815e+006) (40 . 0.0) (41 . 0.0) (42 . 0.0) (10 6.75328e+006 2.06816e+006) 
    (40 . 0.0) (41 . 0.0) (42 . 0.0) (10 6.75328e+006 2.06818e+006) (40 . 0.0) (41 
    . 0.0) (42 . 0.0) (10 6.75328e+006 2.0682e+006) (40 . 0.0) (41 . 0.0) (42 . 
    0.0) (10 6.75328e+006 2.06822e+006) (40 . 0.0) (41 . 0.0) (42 . 0.0) (10 
    6.75328e+006 2.06824e+006) (40 . 0.0) (41 . 0.0) (42 . 0.0) (10 6.75328e+006 
    2.06826e+006) (40 . 0.0) (41 . 0.0) (42 . 0.0) (10 6.75328e+006 2.06828e+006) 
    (40 . 0.0) (41 . 0.0) (42 . 0.0) (10 6.75328e+006 2.0683e+006) (40 . 0.0) (41 . 
    0.0) (42 . 0.0) (10 6.75328e+006 2.06833e+006) (40 . 0.0) (41 . 0.0) (42 . 0.0) 
    (10 6.75328e+006 2.06835e+006) (40 . 0.0) (41 . 0.0) (42 . 0.0) (10 
    6.75328e+006 2.06837e+006) (40 . 0.0) (41 . 0.0) (42 . 0.0) (10 6.75328e+006 
    2.06839e+006) (40 . 0.0) (41 . 0.0) (42 . 0.0) (10 6.75328e+006 2.06841e+006) 
    (40 . 0.0) (41 . 0.0) (42 . 0.0) (10 6.75328e+006 2.06843e+006) (40 . 0.0) (41 
    . 0.0) (42 . 0.0) (210 0.0 0.0 1.0))
    This leads me to believe this is beyond the capabilities of LISP, but I don't know where to look. That's all I'm asking for really. Thanks!
    Attached Images Attached Images

  2. #2
    AUGI Addict
    Join Date
    2005-08
    Posts
    1,043
    Login to Give a bone
    0

    Default Re: Accessing embedded object data

    Dictionaries are there own objects. Then can not be searched for with 'ssget' as they are not graphical. Picked one of the polylines with see and see what it returns.
    Code:
    (entget
     (cdr
      (assoc
        360
       (entget
        (car
         (entsel)
        )
       )
      )
     )
    )

  3. #3
    Member
    Join Date
    2007-08
    Posts
    10
    Login to Give a bone
    0

    Default Re: Accessing embedded object data

    I was hoping that this thread would have kept going, cause I am looking for the exact same info. I have a bunch of polylines brought over from GIS. Instead of looking from a STREETNAME, I am trying to get a CON_NUM & LOT_NUM to label. I ran that code and got the following:

    Code:
    Select object: ((-1 . <Entity name: 7efc3f40>) (0 . "DICTIONARY") (330 . 
    <Entity name: 7efc3f38>) (5 . "98") (100 . "AcDbDictionary") (280 . 1) (281 . 
    1) (3 . "*A1") (360 . <Entity name: 7efc3f48>))
    I then searched the dictionary to see what records and got this:
    Code:
    (dictsearch ent2 "*a1")
    ((-1 . <Entity name: 7ed0bba8>) (0 . "IRD_OBJ_RECORD") (5 . "1E65") (102 . 
    "{ACAD_REACTORS") (330 . <Entity name: 7ed0bba0>) (102 . "}") (330 . <Entity 
    name: 7ed0bba0>) (100 . "CIrdBaseRecord") (1070 . 516) (1071 . 1) (1004 . 
    "01003000000042004C004F0043004B002000410000004F0E0000") (100 . "CIrdObjRecord") 
    (330 . <Entity name: 7efc3e98>))
    I can't see anywhere where it has the LOT_NUM and/or CON_NUM labels. Anyone have any ideas?
    Attached Images Attached Images
    Attached Files Attached Files

  4. #4
    AUGI Addict
    Join Date
    2005-08
    Posts
    1,043
    Login to Give a bone
    0

    Default Re: Accessing embedded object data

    I can't be of much help, as I don't have LDD, and the entities come in as proxy graphic since I don't, but I would search the enames to see if they have the info you want. I wrote a little program that will let you see what is what with enames. No error checking, and will only work if you pick on an ename from the dialog, but it might help shed some light on the problem for you.

    Dialog definition attached. Just place in a search path, and type ' ChaseEntData ' to run the command. Select the polyline, and then go from there.

    Code:
    (defun c:ChaseEntData (/ Sel)
        (if (setq Sel (entsel))
            (ChaseEntData (car Sel))
        )
        (princ)
    )
    ;-----------------------------------------
    (defun ChaseEntData (Ent / DiaRtn DataList)
        
        (while
            (and
                Ent
                (setq DiaRtn
                    (SingleSelectWide
                        (mapcar
                            '(lambda (x / tempType)
                                (if
                                    (and
                                        (equal (type (cdr x)) 'ENAME)
                                        (setq tempType (cdr (assoc 0 (entget (cdr x)))))
                                    )
                                    (strcat
                                        (vl-princ-to-string (car x))
                                        "\t\t"
                                        (vl-princ-to-string (cdr x))
                                        "  [ "
                                        tempType
                                        " ]"
                                    )
                                    (strcat
                                        (vl-princ-to-string (car x))
                                        "\t\t"
                                        (vl-princ-to-string (cdr x))
                                    )
                                )
                            )
                            (setq DataList (entget Ent '("*")))
                        )
                        "Select entity name to chase."
                        nil
                    )
                )
            )
            (if (not (equal (type (setq Ent (cdr (nth (car DiaRtn) DataList)))) 'ENAME))
                (setq Ent nil)
            )
        )
    )
    Code:
    (defun SingleSelectWide (Listof Message Toggle / DiaLoad tmpStr tmpTog tmpList)
    
    	(setq DiaLoad (load_dialog "MyDialogs.dcl"))
    	(if (new_dialog "SingleSelectWide" DiaLOad)
    		(progn
    			(start_list "listbox" 3)
    			(mapcar 'add_list Listof)
    			(end_list)
    			(if Message
    			(set_tile "text1" Message)
    			)
    			(if (not Toggle)
    				(mode_tile "toggle1" 1)
    			)
    			(action_tile "listbox"
    				"(if (= $reason 4)
    					(progn
    						 (setq tmpStr (get_tile \"listbox\"))
    						 (if Toggle
    							(setq tmpTog (get_tile \"toggle1\"))
    						 )
    						 (done_dialog 1)
    					)
    				)"
    			)     
    			(action_tile "accept"
    				"(progn
    					(setq tmpStr (get_tile \"listbox\"))
    					(if Toggle
    						(setq tmpTog (get_tile \"toggle1\"))
    					)
    					(done_dialog 1)
    				)"
    			)
    			(action_tile "cancel" "(done_dialog 0)")
    			(if (= (start_dialog) 1)
    				(progn
    				(setq tmpList (read (strcat "(" tmpStr ")")))
    				(if (= tmpTog "1")
    					 (cons T tmpList)
    					 tmpList
    				)
    				)
    			)
    		)
    	)
    )
    Attached Files Attached Files

Similar Threads

  1. 2014: Added object data fields to Polyline, but object data is empty or zero
    By tntdraftsol in forum AutoCAD Map 3D - General
    Replies: 6
    Last Post: 2015-07-24, 12:20 PM
  2. embedded data in cad blocks -no hyperlink
    By mikec133726 in forum NavisWorks - General
    Replies: 5
    Last Post: 2012-03-03, 05:20 PM
  3. Accessing data within Dynamic Blocks
    By Apsis0215 in forum Dynamic Blocks - Technical
    Replies: 12
    Last Post: 2006-08-24, 02:25 PM
  4. Accessing MV Block information when embedded in a Xref
    By pangell in forum Parts Builder
    Replies: 4
    Last Post: 2006-07-27, 11:56 AM
  5. Accessing ACIS data in Autocad
    By nsuhas in forum Software
    Replies: 2
    Last Post: 2004-10-12, 07:57 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •