TheSwamp

Code Red => .NET => Topic started by: Jeff H on March 07, 2014, 05:43:49 PM

Title: Cracking a SheetSet file(.dst) to view and edit values inside/oustide AutoCAD
Post by: Jeff H on March 07, 2014, 05:43:49 PM
First big thanks to Jar http://www.theswamp.org/index.php?topic=46397.0

How would you guys like to do this?
Title: Re: Cracking a SheetSet file(.dst) to view and edit values inside/oustide AutoCAD
Post by: Kerry on March 07, 2014, 05:49:27 PM

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.
Title: Re: Cracking a SheetSet file(.dst) to view and edit values inside/oustide AutoCAD
Post by: exmachina on March 07, 2014, 06:44:17 PM
I voted tutorial.

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

Title: Re: Cracking a SheetSet file(.dst) to view and edit values inside/oustide AutoCAD
Post by: Jeff H on March 07, 2014, 07:35:59 PM
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
Title: Re: Cracking a SheetSet file(.dst) to view and edit values inside/oustide AutoCAD
Post by: Jeff H on March 07, 2014, 08:29:48 PM
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++  (http://notepad-plus-plus.org/) 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


Title: Re: Cracking a SheetSet file(.dst) to view and edit values inside/oustide AutoCAD
Post by: Jeff H on March 07, 2014, 08:36:04 PM
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<
Title: Re: Cracking a SheetSet file(.dst) to view and edit values inside/oustide AutoCAD
Post by: Jeff H on March 24, 2014, 01:27:44 AM
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)

(http://i1221.photobucket.com/albums/dd473/Jeffrey_H/AddFiles_zpsf98febfd.png)


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

(http://i1221.photobucket.com/albums/dd473/Jeffrey_H/CreateXmlFile_zps1aaaea88.png)

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.  

Title: Re: Cracking a SheetSet file(.dst) to view and edit values inside/oustide AutoCAD
Post by: jhsct on April 18, 2014, 11:40:37 AM
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
Title: Re: Cracking a SheetSet file(.dst) to view and edit values inside/oustide AutoCAD
Post by: Jeff H on April 18, 2014, 12:35:28 PM
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.  
Title: Re: Cracking a SheetSet file(.dst) to view and edit values inside/oustide AutoCAD
Post by: Jeff H on July 08, 2014, 07:02:27 AM
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
Title: Re: Cracking a SheetSet file(.dst) to view and edit values inside/oustide AutoCAD
Post by: MexicanCustard on July 08, 2014, 07:42:31 AM
Great work Jeff!
Title: Re: Cracking a SheetSet file(.dst) to view and edit values inside/oustide AutoCAD
Post by: WILL HATCH on July 08, 2014, 02:26:28 PM
Very nice!

Go get some sleep

 :doa:
Title: Re: Cracking a SheetSet file(.dst) to view and edit values inside/oustide AutoCAD
Post by: Jeff H on September 09, 2014, 05:24:13 PM
Actually you can leave file in a xml format and will still retrieve and display fields.
Title: Re: Cracking a SheetSet file(.dst) to view and edit values inside/oustide AutoCAD
Post by: BlackBox 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/software/FDOT2014CADDSoftware.shtm).

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
Title: Re: Cracking a SheetSet file(.dst) to view and edit values inside/oustide AutoCAD
Post by: Jeff H 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.
Title: Re: Cracking a SheetSet file(.dst) to view and edit values inside/oustide AutoCAD
Post by: Keith Brown on June 26, 2015, 05:10:30 PM
Jeff,


Can you use this information to create a new sheetsheet and add sheets to it?  I am looking at the sheetset api and it appears to me that it involves using COM which my company is not willing to do.
Title: Re: Cracking a SheetSet file(.dst) to view and edit values inside/oustide AutoCAD
Post by: Jeff H on June 26, 2015, 09:38:19 PM
Technically the answer would be yes, but there are things like incrementing the modified version, the dictionary added in NOD when its  layout is referenced as sheet, etc.... and those are just a few things I have noticed and sure there are many more the sheet set api handle for you. Also I have never looked at how it handles locking in network environment.

Using it to exploit the field parser was my main interest, but I started wrapping some of the sheet set api and still use it today but have not looked at it in while.
You can have what I got if you want it.

Title: Re: Cracking a SheetSet file(.dst) to view and edit values inside/oustide AutoCAD
Post by: Keith Brown on June 26, 2015, 09:40:07 PM
I sure wouldnt mind using it as a place to start if you are willing to share!   >:D >:D
Title: Re: Cracking a SheetSet file(.dst) to view and edit values inside/oustide AutoCAD
Post by: Jeff H on June 26, 2015, 09:48:00 PM
Will do sometime this weekend.

I think the main command I still use from that is one creates a excel file with all the standard and custom properties for a sheet set, then you can edit it and push changes back in it.

Title: Re: Cracking a SheetSet file(.dst) to view and edit values inside/oustide AutoCAD
Post by: Keith Brown on June 27, 2015, 08:11:09 AM
Thanks Jeff.
Title: Re: Cracking a SheetSet file(.dst) to view and edit values inside/oustide AutoCAD
Post by: MSTG007 on June 27, 2015, 08:53:08 AM
All I Have to say is ...... "DUDE! WHERES MY CAR?!" That is like WOW. Just thinking about this... how you could possibly link or send information into the sheetset you may have in excel or such... Way AWESOME. Nice Job!
Title: Re: Cracking a SheetSet file(.dst) to view and edit values inside/oustide AutoCAD
Post by: Jeff H on June 29, 2015, 09:42:07 AM
You will probably have update reference location cause would of been to much to send.
Look in commands for SheetSetExcelEdit or something similar.

You can add closedXML through nuget
Title: Re: Cracking a SheetSet file(.dst) to view and edit values inside/oustide AutoCAD
Post by: Keith Brown on June 30, 2015, 08:08:37 AM
Thanks again for sharing Jeff.
Title: Re: Cracking a SheetSet file(.dst) to view and edit values inside/oustide AutoCAD
Post by: Jeff H on June 30, 2015, 02:41:31 PM
No problems,

Don't spend much time trying to get it working, let me know if it isn't and I let you know what I missed or include what is missing.

Title: Re: Cracking a SheetSet file(.dst) to view and edit values inside/oustide AutoCAD
Post by: mjfarrell on March 24, 2016, 04:44:14 PM
How do you get this to run/or load?

Downloaded, extracted..but doesn't seem to run?
Title: Re: Cracking a SheetSet file(.dst) to view and edit values inside/oustide AutoCAD
Post by: Jeff H on March 24, 2016, 06:43:43 PM
That last attachment a couple of post ago is a library and you can not run anything in it.

Are talking about the little thing that converts them to xml from this post?
https://www.theswamp.org/index.php?topic=46497.msg516086#msg516086

If thats the one then after extracting
Xml files will be in ..\AcSmViewer\bin\4.0\Debug\Files\XmlFiles\ folder
Title: Re: Cracking a SheetSet file(.dst) to view and edit values inside/oustide AutoCAD
Post by: Master_Shake on March 25, 2016, 08:03:44 AM
I'm curious how this works

http://jtbworld.com/ssmpropeditor

Pretty much cracks the .dst wide open for editing.
Title: Re: Cracking a SheetSet file(.dst) to view and edit values inside/oustide AutoCAD
Post by: mjfarrell on March 25, 2016, 09:35:23 AM
I'm curious how this works

http://jtbworld.com/ssmpropeditor

Pretty much cracks the .dst wide open for editing.

I don't know that I need that enough to pay %50 for it...just that I have an instance where someone renamed one or two
files from which sheets are taken, effectively breaking the sheet set.  And I don't want to go in a circle of renaming the file, only to have it's name changed again, merry go round.
Title: Re: Cracking a SheetSet file(.dst) to view and edit values inside/oustide AutoCAD
Post by: mjfarrell on March 25, 2016, 09:36:04 AM
That last attachment a couple of post ago is a library and you can not run anything in it.

Are talking about the little thing that converts them to xml from this post?
https://www.theswamp.org/index.php?topic=46497.msg516086#msg516086

If thats the one then after extracting
  • put .dst files you want converted in ..\AcSmViewer\bin\4.0\Debug\Files\SheetSetFiles\ folder
  • Run ..\AcSmViewer\bin\4.0\Debug\AcSmViewer.exe
  • Right click on dst files to create xml files
Xml files will be in ..\AcSmViewer\bin\4.0\Debug\Files\XmlFiles\ folder
Thanks Jeff!
Title: Re: Cracking a SheetSet file(.dst) to view and edit values inside/oustide AutoCAD
Post by: Master_Shake on March 25, 2016, 09:55:40 AM
I'm curious how this works

http://jtbworld.com/ssmpropeditor

Pretty much cracks the .dst wide open for editing.

I don't know that I need that enough to pay %50 for it...just that I have an instance where someone renamed one or two
files from which sheets are taken, effectively breaking the sheet set.  And I don't want to go in a circle of renaming the file, only to have it's name changed again, merry go round.

My issue is that the SSM within AutoCAD is dreadfully slow, but based on this program is do-able to fully separate the sheet set file from the SSM (and even possible to do advanced-ish things like total sheet count).
Title: Re: Cracking a SheetSet file(.dst) to view and edit values inside/oustide AutoCAD
Post by: mjfarrell on March 25, 2016, 10:36:29 AM
I'm curious how this works

http://jtbworld.com/ssmpropeditor

Pretty much cracks the .dst wide open for editing.

I don't know that I need that enough to pay %50 for it...just that I have an instance where someone renamed one or two
files from which sheets are taken, effectively breaking the sheet set.  And I don't want to go in a circle of renaming the file, only to have it's name changed again, merry go round.

My issue is that the SSM within AutoCAD is dreadfully slow, but based on this program is do-able to fully separate the sheet set file from the SSM (and even possible to do advanced-ish things like total sheet count).

Agreed and no argument from me...sadly just goes into the heap of other 65% solutions autodesk puts out there, and then lets them rot or die.
Title: Re: Cracking a SheetSet file(.dst) to view and edit values inside/oustide AutoCAD
Post by: 82L8 on November 23, 2016, 07:13:50 AM
Hello, Jeff H! Seems that there are some mistakes in your code. I believe the values should be:

Code - C#: [Select]
  1. static readonly byte[] encode = new byte[] {
  2.     0x8C, 0x8F, 0x8E, 0x89, 0x88, 0x8B, 0x8A, 0x85, 0x84, 0x87, 0x86, 0x81, 0x80, 0x83, 0x82, >>>0xBD<<<,
  3.     ...
  4.     0x5C, 0x5F, 0x5E, 0x59, 0x58, 0x5B, 0x5A, 0x55, 0x54, 0x57, 0x56, 0x51, 0x50, >>>0x53<<<,  0x52, 0x4D,
  5.     ...
  6.     0x9C, 0x9F, 0x9E, 0x99, 0x98, 0x9B, 0x9A, 0x95, 0x94, 0x97, 0x96, 0x91, 0x90, 0x93, 0x92, >>>0x8D<<<
  7.     };
  8. static readonly byte[] decode = new byte[] {
  9.     ...
  10.     0xC,  0xB,  0xE,  0xD,  0x8,  0x7,  0xA,  0x9,  0x4,  0x3,  0x6,  0x5,  0x0,  >>>0xFF<<<,  0x2,  0x1,
  11.     ...
  12.     };

Anyway, I noticed that there are some non-unique bytes (like 0xFF and 0x3 in 'encode' array) and some missing bytes (like 0x53 and 0xBD in 'encode' array). Could you please check this?

Also, i'd like to share my solution if anyone is interested. I am not a programmer, so I used a batch (the only external application I needed was tr for windows: http://gnuwin32.sourceforge.net/packages/coreutils.htm, do not forget to extract libiconv2.dll and libintl3.dll as well if you'd like to try it):

Code - Winbatch: [Select]
  1. @echo off
  2. set "enc=\0\1\2\3\4\5\6\7\10\11\12\13\14\15\16\17\20\21\22\23\24\25\26\27\30\31\32\33\34\35\36\37\40\41\42\43\44\45\46\47\50\51\52\53\54\55\56\57\60\61\62\63\64\65\66\67\70\71\72\73\74\75\76\77\100\101\102\103\104\105\106\107\110\111\112\113\114\115\116\117\120\121\122\123\124\125\126\127\130\131\132\133\134\135\136\137\140\141\142\143\144\145\146\147\150\151\152\153\154\155\156\157\160\161\162\163\164\165\166\167\170\171\172\173\174\175\176\177\200\201\202\203\204\205\206\207\210\211\212\213\214\215\216\217\220\221\222\223\224\225\226\227\230\231\232\233\234\235\236\237\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277\300\301\302\303\304\305\306\307\310\311\312\313\314\315\316\317\320\321\322\323\324\325\326\327\330\331\332\333\334\335\336\337\340\341\342\343\344\345\346\347\350\351\352\353\354\355\356\357\360\361\362\363\364\365\366\367\370\371\372\373\374\375\376\377"
  3. set "dec=\214\213\216\215\210\207\212\211\204\203\206\205\200\177\202\201\174\173\176\175\170\167\172\171\164\163\166\165\160\157\162\161\254\253\256\255\250\247\252\251\244\243\246\245\240\237\242\241\234\233\236\235\230\227\232\231\224\223\226\225\220\217\222\221\314\313\316\315\310\307\312\311\304\303\306\305\300\277\302\301\274\273\276\275\270\267\272\271\264\263\266\265\260\257\262\261\354\353\356\355\350\347\352\351\344\343\346\345\340\337\342\341\334\333\336\335\330\327\332\331\324\323\326\325\320\317\322\321\14\13\16\15\10\7\12\11\4\3\6\5\0\377\2\1\374\373\376\375\370\367\372\371\364\363\366\365\360\357\362\361\54\53\56\55\50\47\52\51\44\43\46\45\40\37\42\41\34\33\36\35\30\27\32\31\24\23\26\25\20\17\22\21\114\113\116\115\110\107\112\111\104\103\106\105\100\77\102\101\74\73\76\75\70\67\72\71\64\63\66\65\60\57\62\61\154\153\156\155\150\147\152\151\144\143\146\145\140\137\142\141\134\133\136\135\130\127\132\131\124\123\126\125\120\117\122\121"
  4.  
  5. if "%~1"=="" (echo Please drop a file!&pause)
  6. if /i "%~x1"==".dst" (<"%~1" tr "%enc%" "%dec%" >"%~dpn1.xml")
  7. if /i "%~x1"==".ds$" (<"%~1" tr "%enc%" "%dec%" >"%~dpn1.xml")
  8. if /i "%~x1"==".xml" (<"%~1" tr "%dec%" "%enc%" >"%~dpn1.dst")
  9.  

I just drag and drop a DST(XML) file on the batch to get XML(DST) with the same name in the same directory. Seems to work fine so far :)
Title: Re: Cracking a SheetSet file(.dst) to view and edit values inside/oustide AutoCAD
Post by: GILESP on December 01, 2016, 12:53:28 PM
I appreciate I'm a bit late to this party, but taking the work of those before, I've written a slightly different version in VBscript.  Posted below if anyone is interested

Simply drop a dst file onto the script icon in windows and it will convert to xml saved in the same folder as the source, edit the xml and drop it back onto the script and it will convert back again.

Code: [Select]
Dim ObjFile, ObjFSO
Dim Arg, FilePath, FileName
Dim File, OutFile
Dim FileData, StrPos, OutData
Dim InChar, AChar, A8Char, Con8Char,ConChar, OutChar
Dim enc, dec

enc="0\1\2\3\4\5\6\7\10\11\12\13\14\15\16\17\20\21\22\23\24\25\26\27\30\31\32\33\34\35\36\37\40\41\42\43\44\45\46\47\50\51\52\53\54\55\56\57\60\61\62\63\64\65\66\67\70\71\72\73\74\75\76\77\100\101\102\103\104\105\106\107\110\111\112\113\114\115\116\117\120\121\122\123\124\125\126\127\130\131\132\133\134\135\136\137\140\141\142\143\144\145\146\147\150\151\152\153\154\155\156\157\160\161\162\163\164\165\166\167\170\171\172\173\174\175\176\177\200\201\202\203\204\205\206\207\210\211\212\213\214\215\216\217\220\221\222\223\224\225\226\227\230\231\232\233\234\235\236\237\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277\300\301\302\303\304\305\306\307\310\311\312\313\314\315\316\317\320\321\322\323\324\325\326\327\330\331\332\333\334\335\336\337\340\341\342\343\344\345\346\347\350\351\352\353\354\355\356\357\360\361\362\363\364\365\366\367\370\371\372\373\374\375\376\377"
dec="214\213\216\215\210\207\212\211\204\203\206\205\200\177\202\201\174\173\176\175\170\167\172\171\164\163\166\165\160\157\162\161\254\253\256\255\250\247\252\251\244\243\246\245\240\237\242\241\234\233\236\235\230\227\232\231\224\223\226\225\220\217\222\221\314\313\316\315\310\307\312\311\304\303\306\305\300\277\302\301\274\273\276\275\270\267\272\271\264\263\266\265\260\257\262\261\354\353\356\355\350\347\352\351\344\343\346\345\340\337\342\341\334\333\336\335\330\327\332\331\324\323\326\325\320\317\322\321\14\13\16\15\10\7\12\11\4\3\6\5\0\377\2\1\374\373\376\375\370\367\372\371\364\363\366\365\360\357\362\361\54\53\56\55\50\47\52\51\44\43\46\45\40\37\42\41\34\33\36\35\30\27\32\31\24\23\26\25\20\17\22\21\114\113\116\115\110\107\112\111\104\103\106\105\100\77\102\101\74\73\76\75\70\67\72\71\64\63\66\65\60\57\62\61\154\153\156\155\150\147\152\151\144\143\146\145\140\137\142\141\134\133\136\135\130\127\132\131\124\123\126\125\120\117\122\121"

Dim EncA, DecA, APos
encA = Split(enc,"\")
DecA = Split(dec, "\")

'first code takes (arguments) from dropped file as to being the filename
Set ObjFSO = CreateObject("Scripting.filesystemobject")
If WScript.Arguments.Count > 0 Then
For Each Arg In WScript.Arguments
Arg= Trim(Arg)
If InStr(Arg,".dst") Then
'assume a sheet set file
Set ObjFile = ObjFSO.GetFile(Arg)
'grab useful parameters here
FilePath = ObjFSO.GetParentFolderName(ObjFile)& "\"
FileName = Left(ObjFSO.GetFileName(ObjFile), Len(ObjFSO.GetFileName(ObjFile))-4)
'open and read file into variable
Set File  = ObjFSO.OpenTextFile(Arg,1)
FileData = File.ReadAll
'recurse through string, converting characters into empty string
For StrPos = 1 To Len(FileData)
InChar = Mid(FileData, StrPos, 1) 'read character
AChar = AscB(InChar)'convert to ascii number
'A8Char = Oct(AChar)'conversion not needed
Con8Char = DecA(AChar) 'read decoded character (in octal) from array
ConChar = Eval("&O"&Con8Char)'convert octal to decimal
If ConChar <> 254 And ConChar <> 172 Then
'chars 254 and 172 seem to upset xml readers so remove them, Autocad doesn't seem to mind
OutChar = Chr(ConChar)
OutData =OutData & OutChar
End If
Next
'write file
Set OutFile = ObjFSO.OpenTextFile (FilePath & FileName & ".xml", 2,-1)
OutFile.Write OutData
OutFile.Close
MsgBox "SheetSet file " & FileName & " conversion complete", 0 ,"Conversion to XML Complete"
ElseIf InStr(Arg,".xml") Then
'assume an XML file
Set ObjFile = ObjFSO.GetFile(Arg)
'grab useful parameters here
FilePath = ObjFSO.GetParentFolderName(ObjFile)& "\"
FileName = Left(ObjFSO.GetFileName(ObjFile), Len(ObjFSO.GetFileName(ObjFile))-4)
'open and read file into variable
Set File  = ObjFSO.OpenTextFile(Arg,1)
FileData = File.ReadAll
'recurse through string, converting characters into empty string
For StrPos = 1 To Len(FileData)
InChar = Mid(FileData, StrPos, 1)
AChar = AscB(InChar)'convert character into ascii value
A8Char = Oct(AChar)'convert ascii value from decimal to octal
'look up octal number in encode array
For APos = LBound(DecA) To UBound(DecA)-1
If A8Char = DecA(APos) Then
Con8Char = EncA(APos)
Exit For
End If
Next
ConChar = Eval("&O"&Con8Char)'convert encoded ascii value into octal
OutChar = Chr(ConChar)'convert ascii value into character to write
OutData =OutData & OutChar 'add to data string
Next
'write file
Set OutFile = ObjFSO.OpenTextFile (FilePath & FileName & ".dst", 2,-1)
OutFile.Write OutData
OutFile.Close
MsgBox "Conversion to DST Complete",0 ,"SheetSet File Conversion"
End If
Next
End If

Set ObjFile = Nothing
Set ObjFSO = Nothing

Title: Re: Cracking a SheetSet file(.dst) to view and edit values inside/oustide AutoCAD
Post by: Jeff H on December 01, 2016, 01:13:50 PM
Hello, Jeff H! Seems that there are some mistakes in your code. I believe the values should be:
Code - C#: [Select]
  1. static readonly byte[] encode = new byte[] {
  2.     0x8C, 0x8F, 0x8E, 0x89, 0x88, 0x8B, 0x8A, 0x85, 0x84, 0x87, 0x86, 0x81, 0x80, 0x83, 0x82, >>>0xBD<<<,
  3.     ...
  4.     0x5C, 0x5F, 0x5E, 0x59, 0x58, 0x5B, 0x5A, 0x55, 0x54, 0x57, 0x56, 0x51, 0x50, >>>0x53<<<,  0x52, 0x4D,
  5.     ...
  6.     0x9C, 0x9F, 0x9E, 0x99, 0x98, 0x9B, 0x9A, 0x95, 0x94, 0x97, 0x96, 0x91, 0x90, 0x93, 0x92, >>>0x8D<<<
  7.     };
  8. static readonly byte[] decode = new byte[] {
  9.     ...
  10.     0xC,  0xB,  0xE,  0xD,  0x8,  0x7,  0xA,  0x9,  0x4,  0x3,  0x6,  0x5,  0x0,  >>>0xFF<<<,  0x2,  0x1,
  11.     ...
  12.     };

Anyway, I noticed that there are some non-unique bytes (like 0xFF and 0x3 in 'encode' array) and some missing bytes (like 0x53 and 0xBD in 'encode' array). Could you please check this?

Also, i'd like to share my solution if anyone is interested. I am not a programmer, so I used a batch (the only external application I needed was tr for windows: http://gnuwin32.sourceforge.net/packages/coreutils.htm (http://gnuwin32.sourceforge.net/packages/coreutils.htm), do not forget to extract libiconv2.dll and libintl3.dll as well if you'd like to try it):
Code: [Select]
@echo off
set "enc=\0\1\2\3\4\5\6\7\10\11\12\13\14\15\16\17\20\21\22\23\24\25\26\27\30\31\32\33\34\35\36\37\40\41\42\43\44\45\46\47\50\51\52\53\54\55\56\57\60\61\62\63\64\65\66\67\70\71\72\73\74\75\76\77\100\101\102\103\104\105\106\107\110\111\112\113\114\115\116\117\120\121\122\123\124\125\126\127\130\131\132\133\134\135\136\137\140\141\142\143\144\145\146\147\150\151\152\153\154\155\156\157\160\161\162\163\164\165\166\167\170\171\172\173\174\175\176\177\200\201\202\203\204\205\206\207\210\211\212\213\214\215\216\217\220\221\222\223\224\225\226\227\230\231\232\233\234\235\236\237\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277\300\301\302\303\304\305\306\307\310\311\312\313\314\315\316\317\320\321\322\323\324\325\326\327\330\331\332\333\334\335\336\337\340\341\342\343\344\345\346\347\350\351\352\353\354\355\356\357\360\361\362\363\364\365\366\367\370\371\372\373\374\375\376\377"
set "dec=\214\213\216\215\210\207\212\211\204\203\206\205\200\177\202\201\174\173\176\175\170\167\172\171\164\163\166\165\160\157\162\161\254\253\256\255\250\247\252\251\244\243\246\245\240\237\242\241\234\233\236\235\230\227\232\231\224\223\226\225\220\217\222\221\314\313\316\315\310\307\312\311\304\303\306\305\300\277\302\301\274\273\276\275\270\267\272\271\264\263\266\265\260\257\262\261\354\353\356\355\350\347\352\351\344\343\346\345\340\337\342\341\334\333\336\335\330\327\332\331\324\323\326\325\320\317\322\321\14\13\16\15\10\7\12\11\4\3\6\5\0\377\2\1\374\373\376\375\370\367\372\371\364\363\366\365\360\357\362\361\54\53\56\55\50\47\52\51\44\43\46\45\40\37\42\41\34\33\36\35\30\27\32\31\24\23\26\25\20\17\22\21\114\113\116\115\110\107\112\111\104\103\106\105\100\77\102\101\74\73\76\75\70\67\72\71\64\63\66\65\60\57\62\61\154\153\156\155\150\147\152\151\144\143\146\145\140\137\142\141\134\133\136\135\130\127\132\131\124\123\126\125\120\117\122\121"

if "%~1"=="" (echo Please drop a file!&pause)
if /i "%~x1"==".dst" (<"%~1" tr "%enc%" "%dec%" >"%~dpn1.xml")
if /i "%~x1"==".ds$" (<"%~1" tr "%enc%" "%dec%" >"%~dpn1.xml")
if /i "%~x1"==".xml" (<"%~1" tr "%dec%" "%enc%" >"%~dpn1.dst")

I just drag and drop a DST(XML) file on the batch to get XML(DST) with the same name in the same directory. Seems to work fine so far :)
Thanks,
I have not noticed and will look into it as soon as I get some free time.
Have you found any uses or hacks for it?
Title: Re: Cracking a SheetSet file(.dst) to view and edit values inside/oustide AutoCAD
Post by: Jeff H on December 01, 2016, 01:17:14 PM
I appreciate I'm a bit late to this party, but taking the work of those before, I've written a slightly different version in VBscript.  Posted below if anyone is interested

Simply drop a dst file onto the script icon in windows and it will convert to xml saved in the same folder as the source, edit the xml and drop it back onto the script and it will convert back again.

Code: [Select]
Dim ObjFile, ObjFSO
Dim Arg, FilePath, FileName
Dim File, OutFile
Dim FileData, StrPos, OutData
Dim InChar, AChar, A8Char, Con8Char,ConChar, OutChar
Dim enc, dec

enc="0\1\2\3\4\5\6\7\10\11\12\13\14\15\16\17\20\21\22\23\24\25\26\27\30\31\32\33\34\35\36\37\40\41\42\43\44\45\46\47\50\51\52\53\54\55\56\57\60\61\62\63\64\65\66\67\70\71\72\73\74\75\76\77\100\101\102\103\104\105\106\107\110\111\112\113\114\115\116\117\120\121\122\123\124\125\126\127\130\131\132\133\134\135\136\137\140\141\142\143\144\145\146\147\150\151\152\153\154\155\156\157\160\161\162\163\164\165\166\167\170\171\172\173\174\175\176\177\200\201\202\203\204\205\206\207\210\211\212\213\214\215\216\217\220\221\222\223\224\225\226\227\230\231\232\233\234\235\236\237\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277\300\301\302\303\304\305\306\307\310\311\312\313\314\315\316\317\320\321\322\323\324\325\326\327\330\331\332\333\334\335\336\337\340\341\342\343\344\345\346\347\350\351\352\353\354\355\356\357\360\361\362\363\364\365\366\367\370\371\372\373\374\375\376\377"
dec="214\213\216\215\210\207\212\211\204\203\206\205\200\177\202\201\174\173\176\175\170\167\172\171\164\163\166\165\160\157\162\161\254\253\256\255\250\247\252\251\244\243\246\245\240\237\242\241\234\233\236\235\230\227\232\231\224\223\226\225\220\217\222\221\314\313\316\315\310\307\312\311\304\303\306\305\300\277\302\301\274\273\276\275\270\267\272\271\264\263\266\265\260\257\262\261\354\353\356\355\350\347\352\351\344\343\346\345\340\337\342\341\334\333\336\335\330\327\332\331\324\323\326\325\320\317\322\321\14\13\16\15\10\7\12\11\4\3\6\5\0\377\2\1\374\373\376\375\370\367\372\371\364\363\366\365\360\357\362\361\54\53\56\55\50\47\52\51\44\43\46\45\40\37\42\41\34\33\36\35\30\27\32\31\24\23\26\25\20\17\22\21\114\113\116\115\110\107\112\111\104\103\106\105\100\77\102\101\74\73\76\75\70\67\72\71\64\63\66\65\60\57\62\61\154\153\156\155\150\147\152\151\144\143\146\145\140\137\142\141\134\133\136\135\130\127\132\131\124\123\126\125\120\117\122\121"

Dim EncA, DecA, APos
encA = Split(enc,"\")
DecA = Split(dec, "\")

'first code takes (arguments) from dropped file as to being the filename
Set ObjFSO = CreateObject("Scripting.filesystemobject")
If WScript.Arguments.Count > 0 Then
   For Each Arg In WScript.Arguments
      Arg= Trim(Arg)
      If InStr(Arg,".dst") Then
      'assume a sheet set file
         Set ObjFile = ObjFSO.GetFile(Arg)
         'grab useful parameters here
         FilePath = ObjFSO.GetParentFolderName(ObjFile)& "\"
         FileName = Left(ObjFSO.GetFileName(ObjFile), Len(ObjFSO.GetFileName(ObjFile))-4)
         'open and read file into variable
         Set File  = ObjFSO.OpenTextFile(Arg,1)     
         FileData = File.ReadAll
         'recurse through string, converting characters into empty string
         For StrPos = 1 To Len(FileData)
            InChar = Mid(FileData, StrPos, 1) 'read character
            AChar = AscB(InChar)'convert to ascii number
            'A8Char = Oct(AChar)'conversion not needed
            Con8Char = DecA(AChar) 'read decoded character (in octal) from array
            ConChar = Eval("&O"&Con8Char)'convert octal to decimal
            If ConChar <> 254 And ConChar <> 172 Then
               'chars 254 and 172 seem to upset xml readers so remove them, Autocad doesn't seem to mind
               OutChar = Chr(ConChar)
               OutData =OutData & OutChar
            End If
         Next
         'write file
         Set OutFile = ObjFSO.OpenTextFile (FilePath & FileName & ".xml", 2,-1)
         OutFile.Write OutData
         OutFile.Close
         MsgBox "SheetSet file " & FileName & " conversion complete", 0 ,"Conversion to XML Complete"
      ElseIf InStr(Arg,".xml") Then
      'assume an XML file
         Set ObjFile = ObjFSO.GetFile(Arg)
         'grab useful parameters here
         FilePath = ObjFSO.GetParentFolderName(ObjFile)& "\"
         FileName = Left(ObjFSO.GetFileName(ObjFile), Len(ObjFSO.GetFileName(ObjFile))-4)
         'open and read file into variable
         Set File  = ObjFSO.OpenTextFile(Arg,1)
         FileData = File.ReadAll
         'recurse through string, converting characters into empty string
         For StrPos = 1 To Len(FileData)
            InChar = Mid(FileData, StrPos, 1)
            AChar = AscB(InChar)'convert character into ascii value
            A8Char = Oct(AChar)'convert ascii value from decimal to octal
            'look up octal number in encode array
            For APos = LBound(DecA) To UBound(DecA)-1
               If A8Char = DecA(APos) Then
                  Con8Char = EncA(APos)
                  Exit For
               End If
            Next
            ConChar = Eval("&O"&Con8Char)'convert encoded ascii value into octal
            OutChar = Chr(ConChar)'convert ascii value into character to write
            OutData =OutData & OutChar 'add to data string
         Next
         'write file
         Set OutFile = ObjFSO.OpenTextFile (FilePath & FileName & ".dst", 2,-1)
         OutFile.Write OutData
         OutFile.Close
         MsgBox "Conversion to DST Complete",0 ,"SheetSet File Conversion"                       
      End If
   Next
End If         

Set ObjFile = Nothing
Set ObjFSO = Nothing

Cool!
Have you found any uses or hacks for it?
Title: Re: Cracking a SheetSet file(.dst) to view and edit values inside/oustide AutoCAD
Post by: BlackBox on December 01, 2016, 02:39:33 PM
Just thought I'd contribute a shell/context menu for completeness. :-)

For this example, the above VBScript Code is saved to: "C:\CAD\SheetSetConverter.vbs"



Here is the Registry installer (SheetSetConverter.reg):
Code - Microsoft Registry: [Select]
  1. Windows Registry Editor Version 5.00
  2.  
  3. [HKEY_CLASSES_ROOT\*\shell\RightClickSheetSetConverter]
  4. @="Sheet Set Converter"
  5. "AppliesTo"=".dst OR .xml"
  6. "HasLUAShield"=""
  7. "Position"="Bottom"
  8.  
  9. [HKEY_CLASSES_ROOT\*\shell\RightClickSheetSetConverter\command]
  10. @="WScript.exe \"C:\\CAD\\SheetSetConverter.vbs\" \"%1\""
  11.  
  12.  



Here is the Registry un-installer (SheetSetConverter_uninstall.reg):
Code - Microsoft Registry: [Select]
  1. Windows Registry Editor Version 5.00
  2.  
  3. [-HKEY_CLASSES_ROOT\*\shell\RightClickSheetSetConverter]
  4.  
  5. [-HKEY_CLASSES_ROOT\*\shell\RightClickSheetSetConverter\command]
  6.  
  7.  



Edit - Uninstaller updated per 82L8's apt suggestion.
Title: Re: Cracking a SheetSet file(.dst) to view and edit values inside/oustide AutoCAD
Post by: 82L8 on December 02, 2016, 11:02:27 AM
Jeff, I also didn't have much free time after posting... For now I mostly use this script to quickly correct paths or replace text...

BlackBox, thanks for a useful contribution! BTW, shouldn't the SheetSetConverter_uninstall.reg look like that (with minus) to remove the entire tree?
Code - Microsoft Registry: [Select]
  1. Windows Registry Editor Version 5.00
  2.  
  3. [-HKEY_CLASSES_ROOT\*\shell\RightClickSheetSetConverter]
Title: Re: Cracking a SheetSet file(.dst) to view and edit values inside/oustide AutoCAD
Post by: BlackBox on December 02, 2016, 11:21:16 AM
BlackBox, thanks for a useful contribution! BTW, shouldn't the SheetSetConverter_uninstall.reg look like that (with minus) to remove the entire tree?
Code - Microsoft Registry: [Select]
  1. Windows Registry Editor Version 5.00
  2.  
  3. [-HKEY_CLASSES_ROOT\*\shell\RightClickSheetSetConverter]

If that works as you've stated - as I've never seen that before (I'm a youngin' to most) - then hell yeah, it should! Haha 

Thanks for teaching me this useful feature, 82L8. :-) :beer:


Cheers
Title: Re: Cracking a SheetSet file(.dst) to view and edit values inside/oustide AutoCAD
Post by: BlackBox on December 02, 2016, 11:24:26 AM
Well, it seems that I can make new posts fine, but am unable to edit my earlier post? :?
Title: Re: Cracking a SheetSet file(.dst) to view and edit values inside/oustide AutoCAD
Post by: MP on December 02, 2016, 01:39:01 PM
I appreciate I'm a bit late to this party, but taking the work of those before, I've written a slightly different version in VBscript.  Posted below if anyone is interested ...

Thanks for posting this! I quickly and successfully (beta) converted this to LISP (leveraging existing functions from my library). This may prove very useful.
Title: Re: Cracking a SheetSet file(.dst) to view and edit values inside/oustide AutoCAD
Post by: John Kaul (Se7en) on December 02, 2016, 01:48:18 PM
Well, it seems that I can make new posts fine, but am unable to edit my earlier post? :?

Odd. I'm going to try and edit your post--with what you wanted to type--but, I'm going to send you a PM with your post's raw text just in case the sky falls and we loose the post. Do you still have that attachment image (Just in case the post needs to be recreated).

Figured it out! Remove the brackets from the "edit" string and it works (see below). NOTE: I did NOT edit your post.

Quote
Edit - Uninstaller updated per 82L8's apt suggestion.
Title: Re: Cracking a SheetSet file(.dst) to view and edit values inside/oustide AutoCAD
Post by: BlackBox on December 02, 2016, 02:01:14 PM
Odd. I'm going to try and edit your post--with what you wanted to type--but, I'm going to send you a PM with your post's raw text just in case the sky falls and we loose the post. Do you still have that attachment image (Just in case the post needs to be recreated).

Figured it out! Remove the brackets from the "edit" string and it works (see below). NOTE: I did NOT edit your post.

Quote
Edit - Uninstaller updated per 82L8's apt suggestion.

Thanks, John - post updated.



When did that change take affect? :?  This used to work just fine:

Title: Re: Cracking a SheetSet file(.dst) to view and edit values inside/oustide AutoCAD
Post by: John Kaul (Se7en) on December 02, 2016, 02:14:02 PM
Absolutely no problem at all (read: you owe me big-time!). ...I have no idea when that changed. I wonder if Mark updated the forum version (maybe you just found a bug. lol).
Title: Re: Cracking a SheetSet file(.dst) to view and edit values inside/oustide AutoCAD
Post by: BlackBox on December 02, 2016, 02:24:11 PM
... maybe you just found a bug. lol

That seems to be something I excel at doing... Just ask the AutoCAD Beta team. :angel:

/OffTopic
Title: Re: Cracking a SheetSet file(.dst) to view and edit values inside/oustide AutoCAD
Post by: John Kaul (Se7en) on December 02, 2016, 02:27:14 PM
lol
Title: Re: Cracking a SheetSet file(.dst) to view and edit values inside/oustide AutoCAD
Post by: MP on December 03, 2016, 12:39:33 AM
I appreciate I'm a bit late to this party, but taking the work of those before, I've written a slightly different version in VBscript.  Posted below if anyone is interested ...

Thanks for posting this! I quickly and successfully (beta) converted this to LISP (leveraging existing functions from my library). This may prove very useful.

Posted here (https://www.theswamp.org/index.php?topic=52362.msg573119#msg573119), cheers.
Title: Re: Cracking a SheetSet file(.dst) to view and edit values inside/oustide AutoCAD
Post by: VitalyF on December 04, 2016, 03:05:50 PM
Hi all,

I am having problems with VBscript - SheetSetConverter.vbs

See the figure, where: 1 -bath file by 82L8; 2 - SheetSetConverter.vbs by GILESP

any ideas?
Title: Re: Cracking a SheetSet file(.dst) to view and edit values inside/oustide AutoCAD
Post by: 82L8 on December 06, 2016, 04:02:04 AM
BlackBox, thanks for a useful contribution! BTW, shouldn't the SheetSetConverter_uninstall.reg look like that (with minus) to remove the entire tree?
Code - Microsoft Registry: [Select]
  1. Windows Registry Editor Version 5.00
  2.  
  3. [-HKEY_CLASSES_ROOT\*\shell\RightClickSheetSetConverter]

If that works as you've stated - as I've never seen that before (I'm a youngin' to most) - then hell yeah, it should! Haha 

Thanks for teaching me this useful feature, 82L8. :-) :beer:


Cheers

You're welcome, BlackBox! :)
Actually I found this solution (and more) on Rob Van Der Woude's site: http://www.robvanderwoude.com/regedit.php#Remove

P.S: I also tested SheetSetConverter.vbs and got the same malformed output... :(
Title: Re: Cracking a SheetSet file(.dst) to view and edit values inside/oustide AutoCAD
Post by: BlackBox on December 06, 2016, 12:39:42 PM
I am having problems with VBscript - SheetSetConverter.vbs

P.S: I also tested SheetSetConverter.vbs and got the same malformed output... :(

That's weird; using the .VBS + Shell Menu the resultant .XML opens fine, and is human-readable.

... It's all in one, monolithic line (not formatted), but it's all there.



You're welcome, BlackBox! :)
Actually I found this solution (and more) on Rob Van Der Woude's site: http://www.robvanderwoude.com/regedit.php#Remove

Kewl, thanks for the link!


Cheers
Title: Re: Cracking a SheetSet file(.dst) to view and edit values inside/oustide AutoCAD
Post by: BlackBox on December 06, 2016, 12:45:42 PM
... It's all in one, monolithic line (not formatted), but it's all there.

Hooray [Notepad++, Plugins Menu, XML Tools, Pretty Print... And beer]!
Title: Re: Cracking a SheetSet file(.dst) to view and edit values inside/oustide AutoCAD
Post by: VitalyF on December 07, 2016, 12:45:47 AM
Hooray [Notepad++, Plugins Menu, XML Tools, Pretty Print... And beer]!

Do not help nor the xml tools nor the beer
Title: Re: Cracking a SheetSet file(.dst) to view and edit values inside/oustide AutoCAD
Post by: GILESP on December 07, 2016, 11:21:21 AM
Curious,

would you mind stating the steps you're taking, and perhaps sharing the dst file so I can try to recreate the problem at this end?

G

Hi all,

I am having problems with VBscript - SheetSetConverter.vbs

See the figure, where: 1 -bath file by 82L8; 2 - SheetSetConverter.vbs by GILESP

any ideas?
Title: Re: Cracking a SheetSet file(.dst) to view and edit values inside/oustide AutoCAD
Post by: GILESP on December 07, 2016, 11:32:24 AM
One use is to incorporate this code into a bigger project that takes job information from an administrator and create a folder structure, templates and files for a fresh job. being able to build a sheetset outside of AutoCAD would be very handy


Thanks,
I have not noticed and will look into it as soon as I get some free time.
Have you found any uses or hacks for it?
Title: Re: Cracking a SheetSet file(.dst) to view and edit values inside/oustide AutoCAD
Post by: VitalyF on December 07, 2016, 01:02:08 PM
Curious,

would you mind stating the steps you're taking, and perhaps sharing the dst file so I can try to recreate the problem at this end?

Yes, of course
Title: Re: Cracking a SheetSet file(.dst) to view and edit values inside/oustide AutoCAD
Post by: GILESP on December 09, 2016, 04:27:07 AM
Curious,

would you mind stating the steps you're taking, and perhaps sharing the dst file so I can try to recreate the problem at this end?

Yes, of course

Very strange.  Tried opening the sheet set in Acad first - no problem, if a little empty.
Converted using the vbs script, and opened in XML notepad - looks like it should.

Have you tried using a different XML editor?
Title: Re: Cracking a SheetSet file(.dst) to view and edit values inside/oustide AutoCAD
Post by: VitalyF on December 09, 2016, 08:50:35 AM
Curious,

would you mind stating the steps you're taking, and perhaps sharing the dst file so I can try to recreate the problem at this end?

Yes, of course

Very strange.  Tried opening the sheet set in Acad first - no problem, if a little empty.
Converted using the vbs script, and opened in XML notepad - looks like it should.

Have you tried using a different XML editor?

I have the "XML Marker"
Please, attach here the vbs file, not the screen code.
Title: Re: Cracking a SheetSet file(.dst) to view and edit values inside/oustide AutoCAD
Post by: GILESP on December 09, 2016, 08:53:54 AM

I have the "XML Marker"
Please, attach here the vbs file, not the screen code.

No problem.
Title: Re: Cracking a SheetSet file(.dst) to view and edit values inside/oustide AutoCAD
Post by: pBe on December 12, 2016, 02:17:16 PM
Quick question guys.

Is it wise [or better] to read/modify a converted DST file compared to reading the raw DST inside cad through AcSmSheetSetMgr?

I've been thinking of taking this approach.
Title: Re: Cracking a SheetSet file(.dst) to view and edit values inside/oustide AutoCAD
Post by: GILESP on December 13, 2016, 03:04:09 AM
Quick question guys.

Is it wise [or better] to read/modify a converted DST file compared to reading the raw DST inside cad through AcSmSheetSetMgr?

I've been thinking of taking this approach.

Given the woeful lack of documentation of AcSmSheetSetMgr and the general clunkyness of dealing with it in VBA, I think an external editor is a good idea for some tasks. It also removed the need for an Autocad Installation if you just need to perform administrative functions.
Title: Re: Cracking a SheetSet file(.dst) to view and edit values inside/oustide AutoCAD
Post by: bejenaru.a on April 06, 2017, 07:00:41 AM
Hi guys,

I've been trying to use the DSTconvert.vbs and by converting the dst file to Xml and just doing the same backwards without any modification made to the XML file the resulting DST file become corrupt.
I'm afraid it has to do with the accents we use in our paths and file name as it's a spanish project.

I'm attaching the original dst file.
Any ideas?
Title: Re: Cracking a SheetSet file(.dst) to view and edit values inside/oustide AutoCAD
Post by: GILESP on April 06, 2017, 07:11:28 AM
I'm guessing you're right, in that the accents aren't being translated properly as I don't recall seeing them on the translation matrix. 

I will take a look when I have time -I can't make any promises when that might be  :|
Title: Re: Cracking a SheetSet file(.dst) to view and edit values inside/oustide AutoCAD
Post by: pBe on April 06, 2017, 03:14:51 PM
After all the issues i'm having with Sheet Set coding inside Autocad, I'm starting to think that DST to XML and back would be a better approach.

Not really sure until i try it :)
Title: Re: Cracking a SheetSet file(.dst) to view and edit values inside/oustide AutoCAD
Post by: cmwade77 on September 15, 2017, 07:33:04 PM
Ok, so I want to try to do this in my own code and in my own way, but I guess I am not understanding how to figure out what translates to what, here is the code I have:
Code: [Select]
dim dst as FolderItem = SpecialFolder.Desktop.Child("Sample.dst")
dim Results as String


dim enc() as Integer = Array(0,1,2,3,4,5,6,7,10,11,12,13,14,15,16,17,20,21,22,23,24,25,26,27,30,31,32,33,34,35,36,37,40,41,42,43,44,45,46,47,50,51,52,53,54,55,56,57,60,61,62,63,64,65,66,67,70,71,72,73,74,75,76,77,100,101,102,103,104,105,106,107,110,111,112,113,114,115,116,117,120,121,122,123,124,125,126,127,130,131,132,133,134,135,136,137,140,141,142,143,144,145,146,147,150,151,152,153,154,155,156,157,160,161,162,163,164,165,166,167,170,171,172,173,174,175,176,177,200,201,202,203,204,205,206,207,210,211,212,213,214,215,216,217,220,221,222,223,224,225,226,227,230,231,232,233,234,235,236,237,240,241,242,243,244,245,246,247,250,251,252,253,254,255,256,257,260,261,262,263,264,265,266,267,270,271,272,273,274,275,276,277,300,301,302,303,304,305,306,307,310,311,312,313,314,315,316,317,320,321,322,323,324,325,326,327,330,331,332,333,334,335,336,337,340,341,342,343,344,345,346,347,350,351,352,353,354,355,356,357,360,361,362,363,364,365,366,367,370,371,372,373,374,375,376,377)
dim dec() as Integer = Array(214,213,216,215,210,207,212,211,204,203,206,205,200,177,202,201,174,173,176,175,170,167,172,171,164,163,166,165,160,157,162,161,254,253,256,255,250,247,252,251,244,243,246,245,240,237,242,241,234,233,236,235,230,227,232,231,224,223,226,225,220,217,222,221,314,313,316,315,310,307,312,311,304,303,306,305,300,277,302,301,274,273,276,275,270,267,272,271,264,263,266,265,260,257,262,261,354,353,356,355,350,347,352,351,344,343,346,345,340,337,342,341,334,333,336,335,330,327,332,331,324,323,326,325,320,317,322,321,14,13,16,15,10,7,12,11,4,3,6,5,0,377,2,1,374,373,376,375,370,367,372,371,364,363,366,365,360,357,362,361,54,53,56,55,50,47,52,51,44,43,46,45,40,37,42,41,34,33,36,35,30,27,32,31,24,23,26,25,20,17,22,21,114,113,116,115,110,107,112,111,104,103,106,105,100,77,102,101,74,73,76,75,70,67,72,71,64,63,66,65,60,57,62,61,154,153,156,155,150,147,152,151,144,143,146,145,140,137,142,141,134,133,136,135,130,127,132,131,124,123,126,125,120,117,122,121)

dim t as TextInputStream
try
  t = TextInputStream.Open(dst)
  Results = t.ReadAll
  for x as integer = 0 to Dec.Ubound
    Results = Results.ReplaceAll(chr(enc(x)), chr(dec(x)))
  next x
  t.Close
 
catch e as IOException
  t.Close
end try
t.Close

MsgBox(Results)

For those that might know it, I am using a programming language called XOJO and if I can figure out how to pull it off, the ReplaceAll function would be much faster than going through each character.

At this point, I am thinking that I really just need help with figuring out what character maps to what, although I keep seeing things in here about Octal to Decimal and not quite sure what that is about either. And maybe I am trying to oversimplify this.
Title: Re: Cracking a SheetSet file(.dst) to view and edit values inside/oustide AutoCAD
Post by: cmwade77 on September 18, 2017, 06:32:58 PM
I figured it out, I was indeed trying to oversimplify things, but I know have code that seems to work very quickly.