Author Topic: Cracking a SheetSet file(.dst) to view and edit values inside/oustide AutoCAD  (Read 8948 times)

0 Members and 1 Guest are viewing this topic.

Jeff H

  • Needs a day job
  • Posts: 5716
First big thanks to Jar http://www.theswamp.org/index.php?topic=46397.0

How would you guys like to do this?

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11653
  • class keyThumper<T>:ILazy<T>

I voted tutorial.
We can't demand code and who has time for a challenge of this sort ?

Must admit I wasn't sure why that post was started.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

--> Donate to theSwamp<--

exmachina

  • Guest
I voted tutorial.

Must admit I wasn't sure why that post was started.
To give a solution? :lmao:


Jeff H

  • Needs a day job
  • Posts: 5716
I do not want to speak too soon but this is getting better than I thought.

Created a file with .apff extension and added bytes for new custom properties and created text with fields that map to them.
So looks like we can exploit it to make an a way to create custom fields of sort.

This would very usefull

Jeff H

  • Needs a day job
  • Posts: 5716
Will have time to post more information later tonight or tomorrow, but a SheetSet file or .dst is just a XML file with a substitution cipher.


Open a .dst with Notepad++ or something that will display non printable characters.

Or really notepad is fine at first to get started deciphering it, if you open a .dst file in notepad you will see
Quote
ӮߢܮӮʣԮ҃ӮڣأԣΣڮӮʣԣܣϣڮӮӮԮգףޣأӮ⮬ӮԮߢӮ⮬ӮٮӮޣԣɣأȮӮȣʣʣأ׮ӮӮٮӮڣΣΣΣʮӮߣϣۣܣڮӮӮٮӮԣڣۣأ߮ӮգʣȣɣٮӮ宬ӮٮӮأգԣɣخӮգգףڣۮӮ讬ӮٮӮӮٮӮ뮬ӮԮӮأϣɣȣծӮΣȣڣԣɮӮӮٮӮ٣Σ٣ڣήӮޣϣ٣ʣܮӮᮬӮٮӮ鮬ӮԮӮ뮬ӮԮӮգɣΣΣٮӮϣڣڣϣޮӮ⮬ӮٮӮ뮬ӮԮҫ˫Ӯ뮬ӮԮӮ뮬ӮԮҢӮ뮬ӮԮҨ˧Ӯ뮬ӮԮӮڣأգۣȮӮɣˣΣܣȮӮӮٮӮգڣףףڮӮܣܣڣ٣ۮӮӮٮӮޣΣϣϣʮӮ٣ߣΣգۮӮӮٮӮ뮬ӮޮңӮӮٮӮӮޮңӮ뮬ӮޮңӮܣˣϣߣȮӮԣڣףܣɮӮӮٮӮԣգԣأήӮգˣԣգٮӮӮٮӮʣϣףϣܮӮ٣٣ۣߣޮӮӮٮ҃


So we could run test with percentage s that letters normally appear, and run test that to try to find letters that normally are next to each, etc......

We have a huge advantage though because we can insert known values into file and analyze what changed, so we could add a custom SheetSet property and sets its value to AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA

Which if you look in above quote there is a part that is
Quote
Ӯ뮬ӮԮ

Now if I change property value from AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA to BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB then hopefully only repeating values above will change to another repeating value.

With that confirmed we can set value to ABCDEFGHIJKLMNOPQRSTUVWXYZ.........


Sorry for being short but will get more detailed later today or tomorrow



Jeff H

  • Needs a day job
  • Posts: 5716
And to add

AutoCAD comes with SheetSet  samples and here is the IRD Addition.dst in architectural sample

Can't fit all in post so attached file
Code: [Select]
<?xml version="1.0" encoding="UTF-8"?>
<AcSmDatabase clsid="g2162C6B6-0CE4-40E8-912B-46F59DFDF826" ID="gA9DFEA28-A450-4076-8C0F-6ABA0418E5FF">
<AcSmProp propname="DbFingerPrint" vt="8">g89B8180B-4DB0-4C97-974E-01F9483859B8</AcSmProp>
<AcSmProp propname="DbVersion" vt="8">1.1</AcSmProp>
<AcSmProp propname="FileRevision" vt="3">36</AcSmProp>
<AcSmSheetSet clsid="gB20534F2-0978-418C-8D14-2E6928A077ED" ID="g50786B62-0394-4DC2-B91D-3790BAB7A345" propname="SheetSet" vt="13">
<AcSmFileReference clsid="g6BF87AE7-1BEC-4BDB-98BB-5B91F7772793" ID="gC9C96A82-979D-4EA0-B827-97B8D27C0B06" propname="AltPageSetups" vt="13">
<AcSmProp propname="Environ_FileName" vt="8">%ProgramFiles%\AutoCAD 2006\Sample\Sheet Sets\Architectural\IRD.dwt</AcSmProp>
<AcSmProp propname="FileName" vt="8">C:\Program Files\AutoCAD 2006\Sample\Sheet Sets\Architectural\IRD.dwt</AcSmProp>
<AcSmProp propname="Relative_FileName" vt="8">.\IRD.dwt</AcSmProp>
<AcSmProp propname="SpecialFolder_FileName" vt="8">$(CSIDL_PROGRAM_FILES)\AutoCAD 2006\Sample\Sheet Sets\Architectural\IRD.dwt</AcSmProp>
</AcSmFileReference>
<AcSmCalloutBlocks clsid="g203EAB46-483B-4E6B-A10B-15E9A4B210FF" ID="g3D8FB2D2-42BE-408B-9DC8-59C4B2DF4142" propname="CalloutBlocks" vt="13">
<AcSmAcDbBlockRecordReference clsid="g11782523-474B-4C83-9646-57C052847FBB" ID="g82BD5C32-9E78-4A1D-A4D4-8F5AE4FAC610">
<AcSmProp propname="AcDbHandle" vt="8">25C04</AcSmProp>
<AcSmProp propname="Environ_FileName" vt="8">%ProgramFiles%\AutoCAD 2006\Sample\Sheet Sets\Architectural\IRD.dwt</AcSmProp>
<AcSmProp propname="FileName" vt="8">C:\Program Files\AutoCAD 2006\Sample\Sheet Sets\Architectural\IRD.dwt</AcSmProp>
<AcSmProp propname="Name" vt="8">Callout Bubble</AcSmProp>
<AcSmProp propname="Relative_FileName" vt="8">.\IRD.dwt</AcSmProp>
<AcSmProp propname="SpecialFolder_FileName" vt="8">$(CSIDL_PROGRAM_FILES)\AutoCAD 2006\Sample\Sheet Sets\Architectural\IRD.dwt</AcSmProp>
</AcSmAcDbBlockRecordReference>
</AcSmCalloutBlocks>
<AcSmCustomPropertyBag clsid="g4D103908-8C86-4D95-BBF4-68B9A7B00731" ID="gCFB067A4-06AA-4586-91E2-19C3CE0A6014" propname="CustomPropertyBag" vt="13">
<AcSmCustomPropertyValue clsid="g8D22A2A4-1777-4D78-84CC-69EF741FE954" ID="g8F7DC303-A284-473B-8A92-BCE9B83B1D15" propname="Checked By" vt="13">
<AcSmProp propname="Flags" vt="3">2</AcSmProp>
<AcSmProp propname="Value" vt="8">NRB</AcSmProp>
</AcSmCustomPropertyValue>
<AcSmCustomPropertyValue clsid="g8D22A2A4-1777-4D78-84CC-69EF741FE954" ID="g3D53A47C-8C6E-48DF-8F7B-4812D888E7F2" propname="Client City" vt="13">
<AcSmProp propname="Flags" vt="3">1</AcSmProp>
<AcSmProp propname="Value" vt="8">SASKATOON</AcSmProp>
</AcSmCustomPropertyValue>
<AcSmCustomPropertyValue clsid="g8D22A2A4-1777-4D78-84CC-69EF741FE954" ID="gFCE8824D-DB86-4BB6-8978-1E836F861133" propname="Client Name" vt="13">
<AcSmProp propname="Flags" vt="3">1</AcSmProp>
<AcSmProp propname="Value" vt="8">ALLAN CONSTRUCTION LTD.</AcSmProp>
</AcSmCustomPropertyValue>
<AcSmCustomPropertyValue clsid="g8D22A2A4-1777-4D78-84CC-69EF741FE954" ID="gCC6BD663-7283-429F-A180-29149315DEDB" propname="Client State" vt="13">
<AcSmProp propname="Flags" vt="3">1</AcSmProp>
<AcSmProp propname="Value" vt="8">SK</AcSmProp>
</AcSmCustomPropertyValue>
<AcSmCustomPropertyValue clsid="g8D22A2A4-1777-4D78-84CC-69EF741FE954" ID="g76D04D85-BAF5-42A8-B850-6118B5FB5C7F" propname="Client Street" vt="13">
<AcSmProp propname="Flags" vt="3">1</AcSmProp>
<AcSmProp propname="Value" vt="8">123 Main St.</AcSmProp>
</AcSmCustomPropertyValue>
<AcSmCustomPropertyValue clsid="g8D22A2A4-1777-4D78-84CC-69EF741FE954" ID="g6A54EFC7-FC28-498E-B533-8755BFBEFCB4" propname="Client ZIP" vt="13">
<AcSmProp propname="Flags" vt="3">1</AcSmProp>
<AcSmProp propname="Value" vt="8">99999</AcSmProp>
</AcSmCustomPropertyValue>
<AcSmCustomPropertyValue clsid="g8D22A2A4-1777-4D78-84CC-69EF741FE954" ID="g6FAEA2DC-5BFF-49D1-BC53-73E44AA3F532" propname="Drawn By" vt="13">
<AcSmProp propname="Flags" vt="3">2</AcSmProp>
<AcSmProp propname="Value" vt="8">JDP</AcSmProp>
</AcSmCustomPropertyValue>
<AcSmCustomPropertyValue clsid="g8D22A2A4-1777-4D78-84CC-69EF741FE954" ID="gB094E578-42A2-472E-B101-BCE0CA82E5E8" propname="Project City" vt="13">
<AcSmProp propname="Flags" vt="3">1</AcSmProp>
<AcSmProp propname="Value" vt="8">SASKATOON</AcSmProp>
</AcSmCustomPropertyValue>
<AcSmCustomPropertyValue clsid="g8D22A2A4-1777-4D78-84CC-69EF741FE954" ID="gB5B9D1E2-5DB5-4286-9C57-8F8EB0E89EB9" propname="Project Name" vt="13">
<AcSmProp propname="Flags" vt="3">1</AcSmProp>
<AcSmProp propname="Value" vt="8">International Road Dynamics</AcSmProp>
</AcSmCustomPropertyValue>
<AcSmCustomPropertyValue clsid="g8D22A2A4-1777-4D78-84CC-69EF741FE954" ID="g01ED1CEA-3758-4AEC-9301-4270C395FF4F" propname="Project Phase" vt="13">
<AcSmProp propname="Flags" vt="3">1</AcSmProp>
<AcSmProp propname="Value" vt="8">Addition - Phase1</AcSmProp>
</AcSmCustomPropertyValue>
<AcSmCustomPropertyValue clsid="g8D22A2A4-1777-4D78-84CC-69EF741FE954" ID="g0AC21524-AC2E-4151-A9E1-1A1D5985B32A" propname="Project State" vt="13">
<AcSmProp propname="Flags" vt="3">1</AcSmProp>
<AcSmProp propname="Value" vt="8">SK</AcSmProp>
</AcSmCustomPropertyValue>
<AcSmCustomPropertyValue clsid="g8D22A2A4-1777-4D78-84CC-69EF741FE954" ID="g23D643FF-0BBC-4D1B-9862-1F6110B15D7F" propname="Project Street" vt="13">
<AcSmProp propname="Flags" vt="3">1</AcSmProp>
<AcSmProp propname="Value" vt="8">321 First St.</AcSmProp>
</AcSmCustomPropertyValue>
<AcSmCustomPropertyValue clsid="g8D22A2A4-1777-4D78-84CC-69EF741FE954" ID="g06EE65F6-B7D2-42FB-84EB-5828B0155891" propname="Project ZIP" vt="13">
<AcSmProp propname="Flags" vt="3">1</AcSmProp>
<AcSmProp propname="Value" vt="8">99999</AcSmProp>
</AcSmCustomPropertyValue>
<AcSmCustomPropertyValue clsid="g8D22A2A4-1777-4D78-84CC-69EF741FE954" ID="gC4EEB3E5-C8C0-482B-9812-6D2E7172C5B5" propname="Set Date" vt="13">
<AcSmProp propname="Flags" vt="3">1</AcSmProp>
<AcSmProp propname="Value" vt="8">JAN.  2003</AcSmProp>
</AcSmCustomPropertyValue>
<AcSmCustomPropertyValue clsid="g8D22A2A4-1777-4D78-84CC-69EF741FE954" ID="g9739B151-7742-41D0-9F0E-710B7D17A0F1" propname="Sheet Content 1" vt="13">
<AcSmProp propname="Flags" vt="3">2</AcSmProp>
<AcSmProp propname="Value" vt="8">.</AcSmProp>
</AcSmCustomPropertyValue>
<AcSmCustomPropertyValue clsid="g8D22A2A4-1777-4D78-84CC-69EF741FE954" ID="g44BB788A-5114-4816-842B-DD8888A60E5B" propname="Sheet Content 2" vt="13">
<AcSmProp propname="Flags" vt="3">2</AcSmProp>
<AcSmProp propname="Value" vt="8">.</AcSmProp>
</AcSmCustomPropertyValue>
<AcSmCustomPropertyValue clsid="g8D22A2A4-1777-4D78-84CC-69EF741FE954" ID="gE16F3C7B-AA0F-4BDB-B7DB-FD7655411FDC" propname="TransmittalSetups" vt="13">
<SSTransmittalSetups.16 clsid="g087CF7BD-9343-4946-8BEE-44578710527E" ID="gCA88A6E5-F97C-41CC-8450-76CCA4B03351" propname="Value" vt="13">
<SSTransmittalSetup.16 clsid="gFEBD61A0-4DCA-4CC1-A461-6801ED213209" ID="gD3E48FF3-5A43-49A5-BE47-F8CB680AB2F3">
<AcSmProp propname="IncludeDataLinkFile" vt="3">1</AcSmProp>
<AcSmProp propname="IncludeMaterialTextures" vt="3">1</AcSmProp>
<AcSmProp propname="IncludePhotometricWebFile" vt="3">1</AcSmProp>
<AcSmProp propname="IncludeSSFiles" vt="3">1</AcSmProp>
<AcSmProp propname="SetupName" vt="8">Standard</AcSmProp>
<AcSmProp propname="VisualFidelity" vt="3">1</AcSmProp>
</SSTransmittalSetup.16>
<SSTransmittalSetup.16 clsid="gFEBD61A0-4DCA-4CC1-A461-6801ED213209" ID="g0B4A5B1A-F80D-4DB3-8FCE-FF3721CEB693">
<AcSmProp propname="IncludeDataLinkFile" vt="3">1</AcSmProp>
<AcSmProp propname="IncludeMaterialTextures" vt="3">1</AcSmProp>
<AcSmProp propname="IncludePhotometricWebFile" vt="3">1</AcSmProp>
<AcSmProp propname="IncludeSSFiles" vt="3">1</AcSmProp>
<AcSmProp propname="IncludeUnloadedReferences" vt="3">1</AcSmProp>
<AcSmProp propname="SetupName" vt="8">ArchiveStandard</AcSmProp>
<AcSmProp propname="VisualFidelity" vt="3">1</AcSmProp>
</SSTransmittalSetup.16>
</SSTransmittalSetups.16>
</AcSmCustomPropertyValue>
</AcSmCustomPropertyBag>
<AcSmAcDbLayoutReference clsid="g94910E94-4FCA-427C-B6ED-2EC9E1C900C7" ID="gD6353F63-458E-48EB-9A55-28E9073FEF63" propname="DefDwtLayout" vt="13">
<AcSmProp propname="AcDbHandle" vt="8">BA6</AcSmProp>
<AcSmProp propname="Environ_FileName" vt="8">%ProgramFiles%\AutoCAD 2006\Sample\Sheet Sets\Architectural\IRD.dwt</AcSmProp>
<AcSmProp propname="FileName" vt="8">C:\Program Files\AutoCAD 2006\Sample\Sheet Sets\Architectural\IRD.dwt</AcSmProp>
<AcSmProp propname="Name" vt="8">Sheet</AcSmProp>
<AcSmProp propname="Relative_FileName" vt="8">.\IRD.dwt</AcSmProp>
<AcSmProp propname="SpecialFolder_FileName" vt="8">$(CSIDL_PROGRAM_FILES)\AutoCAD 2006\Sample\Sheet Sets\Architectural\IRD.dwt</AcSmProp>
</AcSmAcDbLayoutReference>
<AcSmAcDbBlockRecordReference clsid="g11782523-474B-4C83-9646-57C052847FBB" ID="gF3B76DBE-DBD0-46CA-A4BE-A568CCC20E7D" propname="DefLabelBlk" vt="13">
<AcSmProp propname="AcDbHandle" vt="8">26F93</AcSmProp>
<AcSmProp propname="Environ_FileName" vt="8">%ProgramFiles%\AutoCAD 2006\Sample\Sheet Sets\Architectural\IRD.dwt</AcSmProp>
<AcSmProp propname="FileName" vt="8">C:\Program Files\AutoCAD 2006\Sample\Sheet Sets\Architectural\IRD.dwt</AcSmProp>
<AcSmProp propname="Name" vt="8">Drawing Title</AcSmProp>
<AcSmProp propname="Relative_FileName" vt="8">.\IRD.dwt</AcSmProp>
<AcSmProp propname="SpecialFolder_FileName" vt="8">$(CSIDL_PROGRAM_FILES)\AutoCAD 2006\Sample\Sheet Sets\Architectural\IRD.dwt</AcSmProp>
</AcSmAcDbBlockRecordReference>
<AcSmProp propname="Desc" vt="8">International Road Dynamics Addition Phase 1</AcSmProp>
<AcSmProp propname="Name" vt="8">IRD Addition</AcSmProp>
<AcSmFileReference clsid="g6BF87AE7-1BEC-4BDB-98BB-5B91F7772793" ID="g5D494095-0864-4C41-9247-355CFB1E1A76" propname="NewSheetLocation" vt="13">
<AcSmProp propname="Environ_FileName" vt="8">%ProgramFiles%\AutoCAD 2006\Sample\Sheet Sets\Architectural</AcSmProp>
<AcSmProp propname="FileName" vt="8">C:\Program Files\AutoCAD 2006\Sample\Sheet Sets\Architectural</AcSmProp>
<AcSmProp propname="Relative_FileName" vt="8">.</AcSmProp>
<AcSmProp propname="SpecialFolder_FileName" vt="8">$(CSIDL_PROGRAM_FILES)\AutoCAD 2006\Sample\Sheet Sets\Architectural</AcSmProp>
</AcSmFileReference>
<AcSmProjectPointLocations clsid="gE40EA246-BAB4-4907-81A5-511EA30C16FD" ID="g6966C80F-7C44-4D4F-BB9D-A361E149FE73" propname="ProjectPointLocations" vt="13"/>
<AcSmPublishOptions clsid="gF57F96E7-0F16-4DC9-8F09-52F7BB389AB6" ID="g6AE1F4A1-D887-4BFF-A2D0-839D7FAC1CF8" propname="PublishOptions" vt="13">
<AcSmSimpleFileReferece clsid="gD15A03C2-C39B-428A-9BBA-C031347C496F" ID="gC28240C2-F65B-4C47-8C8C-D99DD6E74DFE" propname="DefaultOutputdir" vt="13">
<AcSmProp propname="Environ_FileName" vt="8">%HOMEDRIVE%\My Documents</AcSmProp>
<AcSmProp propname="FileName" vt="8">C:\My Documents</AcSmProp>
<AcSmProp propname="Relative_FileName" vt="8">..\..\..\..\..\My Documents</AcSmProp>
<AcSmProp propname="SpecialFolder_FileName" vt="8">$(CSIDL_PERSONAL)</AcSmProp>
</AcSmSimpleFileReferece>
<AcSmProp propname="DwfType" vt="2">-1</AcSmProp>
<AcSmProp propname="EplotFormat" vt="3">2</AcSmProp>
<AcSmProp propname="PromptForName" vt="2">-1</AcSmProp>
</AcSmPublishOptions>
<AcSmResources clsid="g3F0FAF10-09DE-4EBA-AED1-C4E4D6FECF5D" ID="gEBA14319-A099-4EF6-93DA-DCBF93833636" propname="Resources" vt="13">
<AcSmFileReference clsid="g6BF87AE7-1BEC-4BDB-98BB-5B91F7772793" ID="g82AC9579-5C00-42CF-89A3-673B7E66DA94">
<AcSmProp propname="Environ_FileName" vt="8">%ProgramFiles%\AutoCAD 2006\Sample\Sheet Sets\Architectural\Res</AcSmProp>
<AcSmProp propname="FileName" vt="8">C:\Program Files\AutoCAD 2006\Sample\Sheet Sets\Architectural\Res</AcSmProp>
<AcSmProp propname="Relative_FileName" vt="8">.\Res</AcSmProp>
<AcSmProp propname="SpecialFolder_FileName" vt="8">$(CSIDL_PROGRAM_FILES)\AutoCAD 2006\Sample\Sheet Sets\Architectural\Res</AcSmProp>
</AcSmFileReference>
<AcSmFileReference clsid="g6BF87AE7-1BEC-4BDB-98BB-5B91F7772793" ID="gF1A6BF50-ACA2-4B52-80FC-814A49DC0C38">
<AcSmProp propname="Environ_FileName" vt="8">%ProgramFiles%\AutoCAD 2006\Sample\Sheet Sets\Architectural</AcSmProp>
<AcSmProp propname="FileName" vt="8">C:\Program Files\AutoCAD 2006\Sample\Sheet Sets\Architectural</AcSmProp>
<AcSmProp propname="Relative_FileName" vt="8">.</AcSmProp>
<AcSmProp propname="SpecialFolder_FileName" vt="8">$(CSIDL_PROGRAM_FILES)\AutoCAD 2006\Sample\Sheet Sets\Architectural</AcSmProp>
</AcSmFileReference>
</AcSmResources>
<AcSmSheetSelSets clsid="g444780B8-6527-43A8-8DC4-FAB41B7E48BB" ID="g998EF864-7DAC-4D04-A61E-5FA5DF4CD549" propname="SheetSelSets" vt="13"/>
<AcSmViewCategories clsid="g021730DF-5BEA-48E9-BC7A-35087A674FD0" ID="gBB562F93-B4E6-4E48-BD53-BBFD3F57F27E" propname="ViewCategories" vt="13">
<AcSmViewCategory clsid="g4AEA81ED-C24F-477B-A534-EA69220A276A" ID="g65993514-6583-4782-BCC4-6B316D4701E0">
<AcSmCalloutBlockReferences clsid="g67C52FE4-0A6B-4C82-A4CC-5E68537747B0" ID="g0841AE5E-106A-454D-908C-7FA310FF5A00" propname="CalloutBlocks" vt="13"/>
<AcSmProp propname="Desc" vt="8">Default Category</AcSmProp>
<AcSmProp propname="Name" vt="8">Default Category</AcSmProp>
</AcSmViewCategory>
<AcSmViewCategory clsid="g4AEA81ED-C24F-477B-A534-EA69220A276A" ID="g31F2F616-523B-4C53-B3C8-D2B6B9036FCE">
<AcSmCalloutBlockReferences clsid="g67C52FE4-0A6B-4C82-A4CC-5E68537747B0" ID="gF08F2A03-57D5-454A-8699-FA5F928E3AF4" propname="CalloutBlocks" vt="13">
<AcSmObjectReference clsid="g00DEB7FB-A073-4ECD-BCE0-121B45C6864D" ID="g5725D038-A905-4964-BA15-29B4C318E15C">
<AcSmProp propname="ReferencedObject" vt="-1">g82BD5C32-9E78-4A1D-A4D4-8F5AE4FAC610</AcSmProp>
</AcSmObjectReference>
</AcSmCalloutBlockReferences>
<AcSmProp propname="Name" vt="8">Elevation</AcSmProp>
</AcSmViewCategory>
<AcSmViewCategory clsid="g4AEA81ED-C24F-477B-A534-EA69220A276A" ID="gCEC2FCF9-E28A-4895-9666-BBD822702768">
<AcSmCalloutBlockReferences clsid="g67C52FE4-0A6B-4C82-A4CC-5E68537747B0" ID="g9DB9D51D-CFAF-4F10-9C3A-1703A300405D" propname="CalloutBlocks" vt="13">
<AcSmObjectReference clsid="g00DEB7FB-A073-4ECD-BCE0-121B45C6864D" ID="g5346A79B-CAA0-4F46-87D8-DE4159322ACA">
<AcSmProp propname="ReferencedObject" vt="-1">g82BD5C32-9E78-4A1D-A4D4-8F5AE4FAC610</AcSmProp>
</AcSmObjectReference>
</AcSmCalloutBlockReferences>
<AcSmProp propname="Name" vt="8">Floor Plans</AcSmProp>
</AcSmViewCategory>
<AcSmViewCategory clsid="g4AEA81ED-C24F-477B-A534-EA69220A276A" ID="g81E666EC-1A99-4CB2-B54C-17562170C96E">
<AcSmCalloutBlockReferences clsid="g67C52FE4-0A6B-4C82-A4CC-5E68537747B0" ID="g00353399-33F2-43F9-A3B4-9C4270BB9CB8" propname="CalloutBlocks" vt="13">
<AcSmObjectReference clsid="g00DEB7FB-A073-4ECD-BCE0-121B45C6864D" ID="g847B4669-5A45-49BF-83DC-EFE4F7A9AFE7">
<AcSmProp propname="ReferencedObject" vt="-1">g82BD5C32-9E78-4A1D-A4D4-8F5AE4FAC610</AcSmProp>
</AcSmObjectReference>
</AcSmCalloutBlockReferences>
<AcSmProp propname="Name" vt="8">Window Types</AcSmProp>
</AcSmViewCategory>
<AcSmViewCategory clsid="g4AEA81ED-C24F-477B-A534-EA69220A276A" ID="gB363EF87-50F1-468F-BEC6-C187C52C76A1">
<AcSmCalloutBlockReferences clsid="g67C52FE4-0A6B-4C82-A4CC-5E68537747B0" ID="g2121FB1F-F616-472C-9C6D-FF3834842DCF" propname="CalloutBlocks" vt="13">
<AcSmObjectReference clsid="g00DEB7FB-A073-4ECD-BCE0-121B45C6864D" ID="gA6189F10-6053-4573-B7C0-950C89CFF202">
<AcSmProp propname="ReferencedObject" vt="-1">g82BD5C32-9E78-4A1D-A4D4-8F5AE4FAC610</AcSmProp>
</AcSmObjectReference>
</AcSmCalloutBlockReferences>
<AcSmProp propname="Name" vt="8">Door Frame Types</AcSmProp>
</AcSmViewCategory>
<AcSmViewCategory clsid="g4AEA81ED-C24F-477B-A534-EA69220A276A" ID="g3BF36F6A-5449-4667-B1C2-13AAD67943AB">
<AcSmCalloutBlockReferences clsid="g67C52FE4-0A6B-4C82-A4CC-5E68537747B0" ID="g33E9440F-69AC-4D7F-A06C-CAE475FD44BA" propname="CalloutBlocks" vt="13">
<AcSmObjectReference clsid="g00DEB7FB-A073-4ECD-BCE0-121B45C6864D" ID="g66320F8C-271E-46F9-B2FE-9C0F35BEAF46">
<AcSmProp propname="ReferencedObject" vt="-1">g82BD5C32-9E78-4A1D-A4D4-8F5AE4FAC610</AcSmProp>
</AcSmObjectReference>
</AcSmCalloutBlockReferences>
<AcSmProp propname="Name" vt="8">DoorTypes</AcSmProp>
</AcSmViewCategory>
<AcSmViewCategory clsid="g4AEA81ED-C24F-477B-A534-EA69220A276A" ID="g9B6AD2CE-1DF4-4AB2-8D3C-80D421587BA0">
<AcSmCalloutBlockReferences clsid="g67C52FE4-0A6B-4C82-A4CC-5E68537747B0" ID="gA68751DD-BCBB-499E-858C-94DD020B0830" propname="CalloutBlocks" vt="13">
<AcSmObjectReference clsid="g00DEB7FB-A073-4ECD-BCE0-121B45C6864D" ID="g9AE8E686-9DC1-41A2-89DF-D388415B13F3">
<AcSmProp propname="ReferencedObject" vt="-1">g82BD5C32-9E78-4A1D-A4D4-8F5AE4FAC610</AcSmProp>
</AcSmObjectReference>
</AcSmCalloutBlockReferences>
<AcSmProp propname="Name" vt="8">Reflected Ceiling Plans</AcSmProp>
</AcSmViewCategory>
<AcSmViewCategory clsid="g4AEA81ED-C24F-477B-A534-EA69220A276A" ID="g7EE092EB-D544-4D61-B907-1554DB12A704">
<AcSmCalloutBlockReferences clsid="g67C52FE4-0A6B-4C82-A4CC-5E68537747B0" ID="g659E79A2-416A-4C09-949D-5A9E94DC050D" propname="CalloutBlocks" vt="13">
<AcSmObjectReference clsid="g00DEB7FB-A073-4ECD-BCE0-121B45C6864D" ID="g8D3F93C8-E2CA-49B3-AEB6-9193106B948C">
<AcSmProp propname="ReferencedObject" vt="-1">g82BD5C32-9E78-4A1D-A4D4-8F5AE4FAC610</AcSmProp>
</AcSmObjectReference>
</AcSmCalloutBlockReferences>
<AcSmProp propname="Name" vt="8">Site</AcSmProp>
</AcSmViewCategory>
<AcSmViewCategory clsid="g4AEA81ED-C24F-477B-A534-EA69220A276A" ID="g38CB8840-F989-4B41-94A5-873327DBDA78">
<AcSmCalloutBlockReferences clsid="g67C52FE4-0A6B-4C82-A4CC-5E68537747B0" ID="g0F3FB836-C68F-4F43-A836-48ACEA8B7F54" propname="CalloutBlocks" vt="13">
<AcSmObjectReference clsid="g00DEB7FB-A073-4ECD-BCE0-121B45C6864D" ID="g52EBF27B-3B52-4B6B-A559-BBB1573AC102">
<AcSmProp propname="ReferencedObject" vt="-1">g82BD5C32-9E78-4A1D-A4D4-8F5AE4FAC610</AcSmProp>
</AcSmObjectReference>
</AcSmCalloutBlockReferences>
<AcSmProp propname="Name" vt="8">Structural Detail</AcSmProp>
</AcSmViewCategory>
<AcSmViewCategory clsid="g4AEA81ED-C24F-477B-A534-EA69220A276A" ID="gAF6D3473-1DAF-4CBE-B506-26887228CE30">
<AcSmCalloutBlockReferences clsid="g67C52FE4-0A6B-4C82-A4CC-5E68537747B0" ID="g75EDD456-8E84-4DD1-AE4E-3CB4DEC4FF63" propname="CalloutBlocks" vt="13">
<AcSmObjectReference clsid="g00DEB7FB-A073-4ECD-BCE0-121B45C6864D" ID="gADDA3194-F3E3-4D36-9717-9D6F5B5D470F">
<AcSmProp propname="ReferencedObject" vt="-1">g82BD5C32-9E78-4A1D-A4D4-8F5AE4FAC610</AcSmProp>
</AcSmObjectReference>
</AcSmCalloutBlockReferences>
<AcSmProp propname="Name" vt="8">Sections<

Jeff H

  • Needs a day job
  • Posts: 5716
Thanks again to jar for contribution from http://www.theswamp.org/index.php?topic=46397.0

But here is a little app attached below to decipher them back and forth from .dst to .xml or .xml to .dst


By double clicking on file name it will open that file with whatever your default settings for xml and dst files are.

Just right click anywhere in area(not on file name) and select add files(this will create a copy so not use original file and will be inside bin folder)




Then right click on dst file and select "Create Xml File"



Also you can right click on xml file and select "Create dst file"


In the app this is the class that does all the converting

Code - C#: [Select]
  1.    public class AcSmXml : XmlDocument
  2.    {
  3.        static readonly byte[] encode = new byte[] {
  4.            0x8C, 0x8F, 0x8E, 0x89, 0x88, 0x8B, 0x8A, 0x85, 0x84, 0x87, 0x86, 0x81, 0x80, 0x83, 0x82, 0x8D,
  5.            0xBC, 0xBF, 0xBE, 0xB9, 0xB8, 0xBB, 0xBA, 0xB5, 0xB4, 0xB7, 0xB6, 0xB1, 0xB0, 0xB3, 0xB2, 0xAD,
  6.            0xAC, 0xAF, 0xAE, 0xA9, 0xA8, 0xAB, 0xAA, 0xA5, 0xA4, 0xA7, 0xA6, 0xA1, 0xA0, 0xA3, 0xA2, 0xDD,
  7.            0xDC, 0xDF, 0xDE, 0xD9, 0xD8, 0xDB, 0xDA, 0xD5, 0xD4, 0xD7, 0xD6, 0xD1, 0xD0, 0xD3, 0xD2, 0xCD,
  8.            0xCC, 0xCF, 0xCE, 0xC9, 0xC8, 0xCB, 0xCA, 0xC5, 0xC4, 0xC7, 0xC6, 0xC1, 0xC0, 0xC3, 0xC2, 0xFD,
  9.            0xFC, 0xFF, 0xFE, 0xF9, 0xF8, 0xFB, 0xFA, 0xF5, 0xF4, 0xF7, 0xF6, 0xF1, 0xF0, 0xF3, 0xF2, 0xED,
  10.            0xEC, 0xEF, 0xEE, 0xE9, 0xE8, 0xEB, 0xEA, 0xE5, 0xE4, 0xE7, 0xE6, 0xE1, 0xE0, 0xE3, 0xE2, 0x1D,
  11.            0x1C, 0x1F, 0x1E, 0x19, 0x18, 0x1B, 0x1A, 0x15, 0x14, 0x17, 0x16, 0x11, 0x10, 0x13, 0x12, 0xD,
  12.            0xC,  0xF,  0xE,  0x9,  0x8,  0xB,  0xA,  0x5,  0x4,  0x7,  0x6,  0x1,  0x0,  0x3,  0x2,  0x3D,
  13.            0x3C, 0x3F, 0x3E, 0x39, 0x38, 0x3B, 0x3A, 0x35, 0x34, 0x37, 0x36, 0x31, 0x30, 0x33, 0x32, 0x2D,
  14.            0x2C, 0x2F, 0x2E, 0x29, 0x28, 0x2B, 0x2A, 0x25, 0x24, 0x27, 0x26, 0x21, 0x20, 0x23, 0x22, 0x5D,
  15.            0x5C, 0x5F, 0x5E, 0x59, 0x58, 0x5B, 0x5A, 0x55, 0x54, 0x57, 0x56, 0x51, 0x50, 0x3,  0x52, 0x4D,
  16.            0x4C, 0x4F, 0x4E, 0x49, 0x48, 0x4B, 0x4A, 0x45, 0x44, 0x47, 0x46, 0x41, 0x40, 0x43, 0x42, 0x7D,
  17.            0x7C, 0x7F, 0x7E, 0x79, 0x78, 0x7B, 0x7A, 0x75, 0x74, 0x77, 0x76, 0x71, 0x70, 0x73, 0x72, 0x6D,
  18.            0x6C, 0x6F, 0x6E, 0x69, 0x68, 0x6B, 0x6A, 0x65, 0x64, 0x67, 0x66, 0x61, 0x60, 0x63, 0x62, 0x9D,
  19.            0x9C, 0x9F, 0x9E, 0x99, 0x98, 0x9B, 0x9A, 0x95, 0x94, 0x97, 0x96, 0x91, 0x90, 0x93, 0x92, 0xFF
  20.  
  21.  
  22.     };
  23.  
  24.        static readonly byte[] decode = new byte[] {
  25.            0x8c, 0x8b, 0x8e, 0x8d, 0x88, 0x87, 0x8a, 0x89, 0x84, 0x83, 0x86, 0x85, 0x80, 0x7f, 0x82, 0x81,
  26.            0x7c, 0x7b, 0x7e, 0x7d, 0x78, 0x77, 0x7a, 0x79, 0x74, 0x73, 0x76, 0x75, 0x70, 0x6f, 0x72, 0x71,
  27.            0xac, 0xab, 0xae, 0xad, 0xa8, 0xa7, 0xaa, 0xa9, 0xa4, 0xa3, 0xa6, 0xa5, 0xa0, 0x9f, 0xa2, 0xa1,
  28.            0x9c, 0x9b, 0x9e, 0x9d, 0x98, 0x97, 0x9a, 0x99, 0x94, 0x93, 0x96, 0x95, 0x90, 0x8f, 0x92, 0x91,
  29.            0xcc, 0xcb, 0xce, 0xcd, 0xc8, 0xc7, 0xca, 0xc9, 0xc4, 0xc3, 0xc6, 0xc5, 0xc0, 0xbf, 0xc2, 0xc1,
  30.            0xbc, 0xbb, 0xbe, 0xbd, 0xb8, 0xb7, 0xba, 0xb9, 0xb4, 0xb3, 0xb6, 0xb5, 0xb0, 0xaf, 0xb2, 0xb1,
  31.            0xec, 0xeb, 0xee, 0xed, 0xe8, 0xe7, 0xea, 0xe9, 0xe4, 0xe3, 0xe6, 0xe5, 0xe0, 0xdf, 0xe2, 0xe1,
  32.            0xdc, 0xdb, 0xde, 0xdd, 0xd8, 0xd7, 0xda, 0xd9, 0xd4, 0xd3, 0xd6, 0xd5, 0xd0, 0xcf, 0xd2, 0xd1,
  33.            0xc,  0xb,  0xe,  0xd,  0x8,  0x7,  0xa,  0x9,  0x4,  0x3,  0x6,  0x5,  0x0,  0xf,  0x2,  0x1,
  34.            0xfc, 0xfb, 0xfe, 0xfd, 0xf8, 0xf7, 0xfa, 0xf9, 0xf4, 0xf3, 0xf6, 0xf5, 0xf0, 0xef, 0xf2, 0xf1,
  35.            0x2c, 0x2b, 0x2e, 0x2d, 0x28, 0x27, 0x2a, 0x29, 0x24, 0x23, 0x26, 0x25, 0x20, 0x1f, 0x22, 0x21,
  36.            0x1c, 0x1b, 0x1e, 0x1d, 0x18, 0x17, 0x1a, 0x19, 0x14, 0x13, 0x16, 0x15, 0x10, 0xf,  0x12, 0x11,
  37.            0x4c, 0x4b, 0x4e, 0x4d, 0x48, 0x47, 0x4a, 0x49, 0x44, 0x43, 0x46, 0x45, 0x40, 0x3f, 0x42, 0x41,
  38.            0x3c, 0x3b, 0x3e, 0x3d, 0x38, 0x37, 0x3a, 0x39, 0x34, 0x33, 0x36, 0x35, 0x30, 0x2f, 0x32, 0x31,
  39.            0x6c, 0x6b, 0x6e, 0x6d, 0x68, 0x67, 0x6a, 0x69, 0x64, 0x63, 0x66, 0x65, 0x60, 0x5f, 0x62, 0x61,
  40.            0x5c, 0x5b, 0x5e, 0x5d, 0x58, 0x57, 0x5a, 0x59, 0x54, 0x53, 0x56, 0x55, 0x50, 0x4f, 0x52, 0x51
  41.            };
  42.  
  43.        public void LoadFromDstFile(string filename)
  44.        {
  45.            if (!File.Exists(filename))
  46.            {
  47.                throw new FileNotFoundException();
  48.            }
  49.            byte[] xmlSource = File.ReadAllBytes(Environment.ExpandEnvironmentVariables(filename));
  50.  
  51.            var ms = new MemoryStream(DecryptFile(xmlSource));
  52.            base.Load(ms);
  53.        }
  54.  
  55.  
  56.        public void SaveAsDstFile(string fileName)
  57.        {
  58.            var ms = new MemoryStream();
  59.            this.Save(ms);
  60.            File.WriteAllBytes(fileName, EncryptFile(ms.ToArray()));
  61.        }
  62.  
  63.        private static byte[] DecryptFile(IEnumerable<byte> bytes)
  64.        {
  65.            return bytes.Select(t => decode[t]).ToArray();
  66.        }
  67.        private static byte[] EncryptFile(IEnumerable<byte> bytes)
  68.        {
  69.            return bytes.Select(t => encode[t]).ToArray();
  70.        }
  71.  
  72.        public static String CreateGuid()
  73.        {
  74.            return "g" + Guid.NewGuid().ToString().ToUpper();
  75.        }
  76.    }
  77.  


jhsct

  • Mosquito
  • Posts: 5
Hello,

I tried running through a converter to VB.Net with the following result.  Unfortunately, there is an issue with the translation.  VB does like the "bytes.[Select]" Any suggestions?

Code: [Select]
Public Class AcSmXml
    Inherits Xml.XmlDocument


    Shared ReadOnly encode As Byte() = New Byte() {&H8C, &H8F, &H8E, &H89, &H88, &H8B, _
     &H8A, &H85, &H84, &H87, &H86, &H81, _
     &H80, &H83, &H82, &H8D, &HBC, &HBF, _
     &HBE, &HB9, &HB8, &HBB, &HBA, &HB5, _
     &HB4, &HB7, &HB6, &HB1, &HB0, &HB3, _
     &HB2, &HAD, &HAC, &HAF, &HAE, &HA9, _
     &HA8, &HAB, &HAA, &HA5, &HA4, &HA7, _
     &HA6, &HA1, &HA0, &HA3, &HA2, &HDD, _
     &HDC, &HDF, &HDE, &HD9, &HD8, &HDB, _
     &HDA, &HD5, &HD4, &HD7, &HD6, &HD1, _
     &HD0, &HD3, &HD2, &HCD, &HCC, &HCF, _
     &HCE, &HC9, &HC8, &HCB, &HCA, &HC5, _
     &HC4, &HC7, &HC6, &HC1, &HC0, &HC3, _
     &HC2, &HFD, &HFC, &HFF, &HFE, &HF9, _
     &HF8, &HFB, &HFA, &HF5, &HF4, &HF7, _
     &HF6, &HF1, &HF0, &HF3, &HF2, &HED, _
     &HEC, &HEF, &HEE, &HE9, &HE8, &HEB, _
     &HEA, &HE5, &HE4, &HE7, &HE6, &HE1, _
     &HE0, &HE3, &HE2, &H1D, &H1C, &H1F, _
     &H1E, &H19, &H18, &H1B, &H1A, &H15, _
     &H14, &H17, &H16, &H11, &H10, &H13, _
     &H12, &HD, &HC, &HF, &HE, &H9, _
     &H8, &HB, &HA, &H5, &H4, &H7, _
     &H6, &H1, &H0, &H3, &H2, &H3D, _
     &H3C, &H3F, &H3E, &H39, &H38, &H3B, _
     &H3A, &H35, &H34, &H37, &H36, &H31, _
     &H30, &H33, &H32, &H2D, &H2C, &H2F, _
     &H2E, &H29, &H28, &H2B, &H2A, &H25, _
     &H24, &H27, &H26, &H21, &H20, &H23, _
     &H22, &H5D, &H5C, &H5F, &H5E, &H59, _
     &H58, &H5B, &H5A, &H55, &H54, &H57, _
     &H56, &H51, &H50, &H3, &H52, &H4D, _
     &H4C, &H4F, &H4E, &H49, &H48, &H4B, _
     &H4A, &H45, &H44, &H47, &H46, &H41, _
     &H40, &H43, &H42, &H7D, &H7C, &H7F, _
     &H7E, &H79, &H78, &H7B, &H7A, &H75, _
     &H74, &H77, &H76, &H71, &H70, &H73, _
     &H72, &H6D, &H6C, &H6F, &H6E, &H69, _
     &H68, &H6B, &H6A, &H65, &H64, &H67, _
     &H66, &H61, &H60, &H63, &H62, &H9D, _
     &H9C, &H9F, &H9E, &H99, &H98, &H9B, _
     &H9A, &H95, &H94, &H97, &H96, &H91, _
     &H90, &H93, &H92, &HFF}

    Shared ReadOnly decode As Byte() = New Byte() {&H8C, &H8B, &H8E, &H8D, &H88, &H87, _
     &H8A, &H89, &H84, &H83, &H86, &H85, _
     &H80, &H7F, &H82, &H81, &H7C, &H7B, _
     &H7E, &H7D, &H78, &H77, &H7A, &H79, _
     &H74, &H73, &H76, &H75, &H70, &H6F, _
     &H72, &H71, &HAC, &HAB, &HAE, &HAD, _
     &HA8, &HA7, &HAA, &HA9, &HA4, &HA3, _
     &HA6, &HA5, &HA0, &H9F, &HA2, &HA1, _
     &H9C, &H9B, &H9E, &H9D, &H98, &H97, _
     &H9A, &H99, &H94, &H93, &H96, &H95, _
     &H90, &H8F, &H92, &H91, &HCC, &HCB, _
     &HCE, &HCD, &HC8, &HC7, &HCA, &HC9, _
     &HC4, &HC3, &HC6, &HC5, &HC0, &HBF, _
     &HC2, &HC1, &HBC, &HBB, &HBE, &HBD, _
     &HB8, &HB7, &HBA, &HB9, &HB4, &HB3, _
     &HB6, &HB5, &HB0, &HAF, &HB2, &HB1, _
     &HEC, &HEB, &HEE, &HED, &HE8, &HE7, _
     &HEA, &HE9, &HE4, &HE3, &HE6, &HE5, _
     &HE0, &HDF, &HE2, &HE1, &HDC, &HDB, _
     &HDE, &HDD, &HD8, &HD7, &HDA, &HD9, _
     &HD4, &HD3, &HD6, &HD5, &HD0, &HCF, _
     &HD2, &HD1, &HC, &HB, &HE, &HD, _
     &H8, &H7, &HA, &H9, &H4, &H3, _
     &H6, &H5, &H0, &HF, &H2, &H1, _
     &HFC, &HFB, &HFE, &HFD, &HF8, &HF7, _
     &HFA, &HF9, &HF4, &HF3, &HF6, &HF5, _
     &HF0, &HEF, &HF2, &HF1, &H2C, &H2B, _
     &H2E, &H2D, &H28, &H27, &H2A, &H29, _
     &H24, &H23, &H26, &H25, &H20, &H1F, _
     &H22, &H21, &H1C, &H1B, &H1E, &H1D, _
     &H18, &H17, &H1A, &H19, &H14, &H13, _
     &H16, &H15, &H10, &HF, &H12, &H11, _
     &H4C, &H4B, &H4E, &H4D, &H48, &H47, _
     &H4A, &H49, &H44, &H43, &H46, &H45, _
     &H40, &H3F, &H42, &H41, &H3C, &H3B, _
     &H3E, &H3D, &H38, &H37, &H3A, &H39, _
     &H34, &H33, &H36, &H35, &H30, &H2F, _
     &H32, &H31, &H6C, &H6B, &H6E, &H6D, _
     &H68, &H67, &H6A, &H69, &H64, &H63, _
     &H66, &H65, &H60, &H5F, &H62, &H61, _
     &H5C, &H5B, &H5E, &H5D, &H58, &H57, _
     &H5A, &H59, &H54, &H53, &H56, &H55, _
     &H50, &H4F, &H52, &H51}

    Public Sub LoadFromDstFile(filename As String)
        If Not File.Exists(filename) Then
            Throw New FileNotFoundException()
        End If
        Dim xmlSource As Byte() = File.ReadAllBytes(Environment.ExpandEnvironmentVariables(filename))

        Dim ms = New MemoryStream(DecryptFile(xmlSource))
        MyBase.Load(ms)
    End Sub


    Public Sub SaveAsDstFile(fileName As String)
        Dim ms = New MemoryStream()
        Me.Save(ms)
        File.WriteAllBytes(fileName, EncryptFile(ms.ToArray()))
    End Sub

    Private Shared Function DecryptFile(bytes As IEnumerable(Of Byte)) As Byte()
        Return bytes.[Select](Function(t) decode(t)).ToArray()
    End Function
    Private Shared Function EncryptFile(bytes As IEnumerable(Of Byte)) As Byte()
        Return bytes.[Select](Function(t) encode(t)).ToArray()
    End Function

    Public Shared Function CreateGuid() As [String]
        Return "g" + Guid.NewGuid().ToString().ToUpper()
    End Function
End Class

Jeff H

  • Needs a day job
  • Posts: 5716
The convertor screwed up on linq expression and instead of looking at VB linq syntax just change to

Code - Visual Basic: [Select]
  1.    Private Shared Function DecryptFile(bytes As IEnumerable(Of Byte)) As Byte()
  2.        Dim list = New List(Of Byte)()
  3.        For Each b As Byte In bytes
  4.            list.Add(decode(b))
  5.        Next
  6.  
  7.        Return list.ToArray()
  8.    End Function
  9.  

Jeff H

  • Needs a day job
  • Posts: 5716
Holy SH*T this is proving to be the most the useful piece of information in probably the last 5 years for AutoCAD I have learned.
So far getting everything and more mentioned at http://www.theswamp.org/index.php?topic=45506.msg506788#msg506788.
Will let you know in month in that one little thing just makes it all blow up in my face.

The previous example is bloated and contains bunch of information that is not needed

Quick overview

This is a  file with SubSet called Panels(which normally contains a subset for each panel, which contains a sheet for each circuit), but has 1 Subset called Panels and one sheet.
For custom properties it has
- one custom SheetSet(Flags = 1) property = SheetSetProp
- one custom Sheet(flags = 2) property = SheetProp

All custom properties will be in AcSmCustomPropertyBag of SheetSet at beginning of file but only custom Sheet Properties will be in AcSmCustomPropertyBag of each sheet.

The clsid are always the same for each different type or type of tags
So every AcSmCustomPropertyValue  will have clsid="g8D22A2A4-1777-4D78-84CC-69EF741FE954" for each one.

The ID will vary and is a GUID prefixed with "g"
Something like
Code - C#: [Select]
  1. public static String CreateGuid()
  2.        {
  3.            return "g" + Guid.NewGuid().ToString().ToUpper();
  4.        }
  5.  

Here is sheetset file using code below to produce a xml file

Code - XML: [Select]
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <AcSmDatabase clsid="g2162C6B6-0CE4-40E8-912B-46F59DFDF826" ID="gB471938F-9CD9-47DD-88D9-C93B9CD4AC4C">
  3.  <AcSmProp propname="DbFingerPrint" vt="8">g344B5363-A206-4697-A138-DA8647EC633E</AcSmProp>
  4.  <AcSmProp propname="DbVersion" vt="8">1.1</AcSmProp>
  5.  <AcSmProp propname="FileRevision" vt="3">8</AcSmProp>
  6.  <AcSmSheetSet clsid="gB20534F2-0978-418C-8D14-2E6928A077ED" ID="gC27BE458-B7E5-4F9A-A6B5-CA9FF5F653BF" propname="SheetSet" vt="13">
  7.    <AcSmCalloutBlocks clsid="g203EAB46-483B-4E6B-A10B-15E9A4B210FF" ID="gD3126597-B1CC-4AAE-A787-A7ABB89889A9" propname="CalloutBlocks" vt="13" />
  8.    <AcSmCustomPropertyBag clsid="g4D103908-8C86-4D95-BBF4-68B9A7B00731" ID="gFC23A2B9-5C4B-4783-B512-080815893238" propname="CustomPropertyBag" vt="13">
  9.      <AcSmCustomPropertyValue clsid="g8D22A2A4-1777-4D78-84CC-69EF741FE954" ID="g808D5B88-A740-46D6-A5EB-F99203E2CD52" propname="SheetProp" vt="13">
  10.        <AcSmProp propname="Flags" vt="3">2</AcSmProp>
  11.        <AcSmProp propname="Value" vt="8">SheetPropValue</AcSmProp>
  12.      </AcSmCustomPropertyValue>
  13.      <AcSmCustomPropertyValue clsid="g8D22A2A4-1777-4D78-84CC-69EF741FE954" ID="gCE72C34C-36FD-49EA-8F4E-C86E32A53E47" propname="SheetSetProp" vt="13">
  14.        <AcSmProp propname="Flags" vt="3">1</AcSmProp>
  15.        <AcSmProp propname="Value" vt="8">SheetSetPropValue</AcSmProp>
  16.      </AcSmCustomPropertyValue>
  17.    </AcSmCustomPropertyBag>
  18.    <AcSmAcDbLayoutReference clsid="g94910E94-4FCA-427C-B6ED-2EC9E1C900C7" ID="gFF3164E2-2780-41ED-AC5C-1FB2C50FEF47" propname="DefDwtLayout" vt="13" />
  19.    <AcSmAcDbBlockRecordReference clsid="g11782523-474B-4C83-9646-57C052847FBB" ID="g32D3CAEF-A0A3-48DD-B863-8A13D34D61CF" propname="DefLabelBlk" vt="13" />
  20.    <AcSmProp propname="Name" vt="8">FakeSheets</AcSmProp>
  21.    <AcSmFileReference clsid="g6BF87AE7-1BEC-4BDB-98BB-5B91F7772793" ID="gC58476C2-4631-43F2-AC25-0B98A7358D10" propname="NewSheetLocation" vt="13" />
  22.    <AcSmProjectPointLocations clsid="gE40EA246-BAB4-4907-81A5-511EA30C16FD" ID="g02810C36-B261-4EE2-BF9A-6E4A5BDDB533" propname="ProjectPointLocations" vt="13" />
  23.    <AcSmPublishOptions clsid="gF57F96E7-0F16-4DC9-8F09-52F7BB389AB6" ID="gDAE10894-6940-444E-B902-A37408134DD4" propname="PublishOptions" vt="13">
  24.      <AcSmSimpleFileReferece clsid="gD15A03C2-C39B-428A-9BBA-C031347C496F" ID="g7E6B6619-09DB-4763-88F0-D56EA6C20869" propname="DefaultOutputdir" vt="13" />
  25.      <AcSmProp propname="DwfType" vt="2">-1</AcSmProp>
  26.      <AcSmProp propname="EplotFormat" vt="3">2</AcSmProp>
  27.      <AcSmProp propname="LayerInfo" vt="2">-1</AcSmProp>
  28.      <AcSmProp propname="PromptForName" vt="2">-1</AcSmProp>
  29.    </AcSmPublishOptions>
  30.    <AcSmResources clsid="g3F0FAF10-09DE-4EBA-AED1-C4E4D6FECF5D" ID="g9ADA3CD6-421C-4A72-A8F0-2FE50538FB94" propname="Resources" vt="13" />
  31.    <AcSmSheetSelSets clsid="g444780B8-6527-43A8-8DC4-FAB41B7E48BB" ID="g1D5A7459-3A8C-420D-A69E-AE528144B907" propname="SheetSelSets" vt="13" />
  32.    <AcSmViewCategories clsid="g021730DF-5BEA-48E9-BC7A-35087A674FD0" ID="g5C5AFA89-AE6D-4961-98CD-A85CD33874ED" propname="ViewCategories" vt="13">
  33.      <AcSmViewCategory clsid="g4AEA81ED-C24F-477B-A534-EA69220A276A" ID="g14DCE2AB-8F6D-4E87-9812-0DD511FDC07A">
  34.        <AcSmCalloutBlockReferences clsid="g67C52FE4-0A6B-4C82-A4CC-5E68537747B0" ID="g77D65516-62D5-4D85-8ADE-CD06AC4E57E2" propname="CalloutBlocks" vt="13" />
  35.      </AcSmViewCategory>
  36.    </AcSmViewCategories>
  37.    <AcSmSubset clsid="g076D548F-B0F5-4FE1-B35D-7F7B73B8D322" ID="g97D3D632-6443-4875-A408-BE3E48B1C960">
  38.      <AcSmProp propname="Desc" vt="8">New subset added</AcSmProp>
  39.      <AcSmProp propname="Name" vt="8">Panels</AcSmProp>
  40.      <AcSmFileReference clsid="g6BF87AE7-1BEC-4BDB-98BB-5B91F7772793" ID="g980BC295-D2D4-4400-914C-BA8B59283CA8" propname="NewSheetLocation" vt="13" />
  41.      <AcSmSheet clsid="g16A07941-BC15-4D48-A880-9D5A211D5065" ID="g061239F9-15D7-4019-92D1-E3701DDA7E96">
  42.        <AcSmCustomPropertyBag clsid="g4D103908-8C86-4D95-BBF4-68B9A7B00731" ID="g95E6363D-37FC-43A2-8C07-9209198F7484" propname="CustomPropertyBag" vt="13">
  43.          <AcSmCustomPropertyValue clsid="g8D22A2A4-1777-4D78-84CC-69EF741FE954" ID="g43C5ED98-73AC-4705-BC68-773F00A409FE" propname="SheetProp" vt="13">
  44.            <AcSmProp propname="Flags" vt="3">2</AcSmProp>
  45.            <AcSmProp propname="Value" vt="8">SheetPropValue</AcSmProp>
  46.          </AcSmCustomPropertyValue>
  47.        </AcSmCustomPropertyBag>
  48.        <AcSmAcDbLayoutReference clsid="g94910E94-4FCA-427C-B6ED-2EC9E1C900C7" ID="g3B3E84D5-B60F-4CD9-B529-A721E7C416F0" propname="Layout" vt="13">
  49.          <AcSmProp propname="Name" vt="8">FakeSheetName</AcSmProp>
  50.        </AcSmAcDbLayoutReference>
  51.        <AcSmProp propname="Number" vt="8">E-1</AcSmProp>
  52.        <AcSmSheetViews clsid="gF40F931B-64BC-4B90-9FC8-A11A77D6815B" ID="g3005F031-7A28-46A5-A84B-249F737E3114" propname="SheetViews" vt="13" />
  53.        <AcSmProp propname="Title" vt="8">FakeSheetTitle</AcSmProp>
  54.      </AcSmSheet>
  55.    </AcSmSubset>
  56.  </AcSmSheetSet>
  57. </AcSmDatabase>
  58.  


So to use the custom property in text or field, etc..  for the sheet SheetProp

All I need is
File Path of sheet set file and can have any extension.
ID of Sheetset(on line 6 above)
ID of Sheet(line 41 above)
And prop name

Can add formatting and hyperlink information at end.
%<\AcSm Database("C:\Users\Jeff\Dropbox\Testing\Autocad\AcSm\New folder\FakeSheets.dst").SheetSet("gC27BE458-B7E5-4F9A-A6B5-CA9FF5F653BF").Component("g061239F9-15D7-4019-92D1-E3701DDA7E96").SheetProp>%

That's it but can get very powerful and useful.

For example a palette  that allows you to fill in panel information, but think about drawings with 10 panels and each panel has 84 circuits and need to add a circuit at #10 and move the rest down how you would have to update schedules and the homeruns indicated for each circuit would have to be changed

as for attributes and just a guess
clsid = class id
vt = value type
again just a guess

MexicanCustard

  • Swamp Rat
  • Posts: 665
Great work Jeff!
AMEP 2016 64bit Win 7

WILL HATCH

  • Bull Frog
  • Posts: 389
Very nice!

Go get some sleep

 :doa:

Jeff H

  • Needs a day job
  • Posts: 5716
Re: Cracking a SheetSet file(.dst) to view and edit values inside/oustide AutoCAD
« Reply #12 on: September 09, 2014, 05:24:13 pm »
Actually you can leave file in a xml format and will still retrieve and display fields.

BlackBox

  • King Gator
  • Posts: 3736
Re: Cracking a SheetSet file(.dst) to view and edit values inside/oustide AutoCAD
« Reply #13 on: September 09, 2014, 05:32:35 pm »
I voted for tutorial as well.



As it is related to SSM, you might be interested in FDOT's Sheet Set Organizer (SSO) application, which is part of their Civil 3D 2014 State Kit.

http://www.dot.state.fl.us/ecso/downloads/publications/Civil3DWorkflows/wf51pr00154.html

http://www.dot.state.fl.us/ecso/downloads/documentation/AutodeskResources/FDOT_SheetSetOrganizerIntroduction.pdf



I stopped Beta testing back during Civil 3D 2012 State Kit; so long as nothing's changed, their .NET assemblies were not obfuscated, so can use IlSpy, etc. to cull.

Cheers
« Last Edit: September 09, 2014, 05:50:22 pm by BlackBox »
"Potential has a shelf life." - Margaret Atwood

Jeff H

  • Needs a day job
  • Posts: 5716
Re: Cracking a SheetSet file(.dst) to view and edit values inside/oustide AutoCAD
« Reply #14 on: September 09, 2014, 05:44:59 pm »
I will have time this week to explain it better and post some real world examples of using it.