.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

lower case in summary info key values

2 REPLIES 2
Reply
Message 1 of 3
Anonymous
214 Views, 2 Replies

lower case in summary info key values

Hi everybody
I am running the following code

Dim db As New Database(False, True)
Dim builder As New DatabaseSummaryInfoBuilder
db.ReadDwgFile(localFullFileName, IO.FileShare.ReadWrite, False, Nothing)
builder.CustomProperties.Item("MyKey") = "someValue"
db.SummaryInfo = builder.ToDatabaseSummaryInfo
db.SaveAs(localFullFileName, DwgVersion.Current)


It works fine, it writes the custom property and its value.The problem I have, it writes the custom key property named MyKey in lower case ( mykey ), the value of this property (someValue) is written fine though. Any idea how to make it write the key value without the lower case conversion?

Any ideas I appreciate

Thanks

Raul
2 REPLIES 2
Message 2 of 3
Anonymous
in reply to: Anonymous

The custom properties are stored in a StringDictionary
(a standard framework class), that always converts
the key to lower case.

I don't know how that affects custom properties with
keys that may have uppercase characters if it was
ever possible to do that, but my guess is the indexer
will treat them as different items, which is not good.

If you have older drawings with custom properties
whose names are not all lower case, you might want
to test them to see what what happens when you try
to access them via the API.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005/2006/2007
http://www.acadxtabs.com

wrote in message news:5505199@discussion.autodesk.com...
Hi everybody
I am running the following code

Dim db As New Database(False, True)
Dim builder As New DatabaseSummaryInfoBuilder
db.ReadDwgFile(localFullFileName, IO.FileShare.ReadWrite, False, Nothing)
builder.CustomProperties.Item("MyKey") = "someValue"
db.SummaryInfo = builder.ToDatabaseSummaryInfo
db.SaveAs(localFullFileName, DwgVersion.Current)


It works fine, it writes the custom property and its value.The problem I have, it writes the custom key property named MyKey in lower case ( mykey ), the value of this property (someValue) is written fine though. Any idea how to make it write the key value without the lower case conversion?

Any ideas I appreciate

Thanks

Raul
Message 3 of 3
Anonymous
in reply to: Anonymous

Thanks Tony

Raul

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost