.NET

Reply
Active Contributor
ZK_BUDiKOM
Posts: 30
Registered: ‎09-13-2012
Message 1 of 2 (224 Views)

C# - Dictionary

224 Views, 1 Replies
12-04-2012 01:49 AM

Hi,

 

I would like to make code in C#, works like this (LISP):

 

Create Dictionary:

 

(defun cd:DCT_AddDict (Root Name)
   (dictadd (if (not Root) (namedobjdict) Root) Name
   (entmakex (append '((0 . "DICTIONARY")(100 . "AcDbDictionary"))))
))

;run: (cd:DCT_AddDict (namedobjdict) "MyDict");

 

Add Xrecord to my Dictionary:

 

(defun cd:DCT_AddXrecord (Root XName XData)
  (dictadd (if (not Root) (namedobjdict) Root) XName
  (entmakex (append '((0 . "XRECORD")(100 . "AcDbXrecord")) XData))
))

;run: (cd:DCT_AddXrecord (cd:DCT_GetDict (namedobjdict) "MyDict") "MyDict-SUB1" '((1 . "ABC")));

 

Have you any example?

 

My soft: MVS2010, AutoCAD2013

 

regards

Active Contributor
ZK_BUDiKOM
Posts: 30
Registered: ‎09-13-2012
Message 2 of 2 (174 Views)

Re: C# - Dictionary

12-05-2012 11:18 PM in reply to: ZK_BUDiKOM

Ok,

 

I have found solution here:

http://www.theswamp.org/index.php?topic=38958.0;all

 

regards

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Do you have 60 seconds to spare? The Autodesk Community Team is revamping our site ranking system and we want your feedback! Please click here to launch the 5 question survey. As always your input is greatly appreciated.