See the top rated post in this thread. Click here

Results 1 to 8 of 8

Thread: getting OD: strings out of ACAD_XDICTIONARY

  1. #1
    Member
    Join Date
    2010-05
    Posts
    4
    Login to Give a bone
    0

    Default getting OD: strings out of ACAD_XDICTIONARY

    I've been AutoLisping for quite a while but havent had to dig into this type of attribute 'till now. And havent found good direction from searches so I figured I try here.

    I have some data that was imported from a ESRI shape file and holds the attributes I need as a ACAD_XDICTIONARY objects. I just need to pull that attribute out for some LISP command I need to run on it.

    This is it:

    ((-1 . <Entity name: 7e922d50>) (0 . "LWPOLYLINE") (5 . "1F5D2")
    (102 . "{ACAD_XDICTIONARY") (360 . <Entity name: 7e922d58>) (102 . "}") (330 .
    <Entity name: 7ee5ccf8>) (100 . "AcDbEntity") (67 . 0) (410 . "Model") (8 .
    "Lift1_hulls") (100 . "AcDbPolyline") (90 . 36) ................the rest of the ent data........

    Thanks for the help,
    Jeremy

  2. #2
    AUGI Addict
    Join Date
    2008-02
    Posts
    1,141
    Login to Give a bone
    0

    Default Re: getting OD: strings out of ACAD_XDICTIONARY

    (assoc 360

  3. #3
    Member
    Join Date
    2010-05
    Posts
    4
    Login to Give a bone
    0

    Default Re: getting OD: strings out of ACAD_XDICTIONARY

    Quote Originally Posted by alanjt View Post
    (assoc 360
    Thanks, I got that far but I still cant find where my attribute is...


    (entget (cdr (assoc 360 (entget (car (entsel))))))

    Returns:
    ((-1 . <Entity name: 7e922d80>) (0 . "DICTIONARY") (330 .
    <Entity name: 7e922d78>) (5 . "1F5D8") (100 . "AcDbDictionary") (280 . 1) (281
    . 1) (3 . "*A1") (360 . <Entity name: 7e922d88>))

    and

    (entget (cdr (assoc 360 (entget (cdr (assoc 360 (entget (car
    (entsel)))))))))

    Returns:
    ((-1 . <Entity name: 7e922d88>) (0 . "IRD_OBJ_RECORD") (5 .
    "1F5D9") (102 . "{ACAD_REACTORS") (330 . <Entity name: 7e922d80>) (102 . "}")
    (330 . <Entity name: 7e922d80>) (100 . "CIrdBaseRecord") (1070 . 516) (1071 .
    1) (1004 . "01003100360032003800320032000000") (100 . "CIrdObjRecord") (330 .
    <Entity name: 7ee5e430>))

    I keep going down that rabit hole and never come across my attribute.

    Thanks

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

    Default Re: getting OD: strings out of ACAD_XDICTIONARY

    It might help if you can post a small drawing with the object desired to get information from, and if you know what the information is, that also. That was people can help better, as right now we would be shooting from the hip while blindfolded at a cactus needle.

  5. #5
    Member
    Join Date
    2010-05
    Posts
    4
    Login to Give a bone
    0

    Default Re: getting OD: strings out of ACAD_XDICTIONARY

    Sure. Here is a small peice of the attributed graphics. I'm using Autocad MAP 2004 and 2008. The object data is NAME: 162822

    Thanks
    Attached Files Attached Files

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

    Default Re: getting OD: strings out of ACAD_XDICTIONARY

    I'm not going to be much help anymore, as I don't have map, so it just shows it as a proxy object, but here is some code that might help you. It is what I use to step through an entity.

    Just put the dcl file in the search path somewhere.
    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)
            )
        )
    )
    (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

  7. #7
    Member
    Join Date
    2010-05
    Posts
    4
    Login to Give a bone
    0

    Default Re: getting OD: strings out of ACAD_XDICTIONARY

    I found what I was looking for, seems to be some object data handling functions:

    ade_odgettables
    ade_odrecordqty
    ade_odtabledefn
    ade_odgetfield

    Thanks for the help all.

  8. #8
    Member
    Join Date
    2000-12
    Posts
    6
    Login to Give a bone
    0

    Default Re: getting OD: strings out of ACAD_XDICTIONARY

    T.Willey,

    VERY helpful code! This helped me to better understand associative dimensions.


    Regards,
    Jerry

Similar Threads

  1. text strings on schedules?
    By timsea81 in forum Revit MEP - General
    Replies: 1
    Last Post: 2009-05-08, 04:30 PM
  2. Looking for MISC Strings
    By KGC in forum AutoLISP
    Replies: 2
    Last Post: 2008-03-04, 08:51 PM
  3. Dimension Strings?
    By ty_demo15 in forum Revit Architecture - General
    Replies: 9
    Last Post: 2008-02-12, 07:36 AM
  4. Predefined text strings
    By robert.1.hall72202 in forum AutoCAD Customization
    Replies: 2
    Last Post: 2007-07-12, 08:17 PM
  5. GetInterfaceObject Strings
    By bweir in forum VBA/COM Interop
    Replies: 2
    Last Post: 2006-07-13, 09:40 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
  •