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

0 Members and 1 Guest are viewing this topic.

GILESP

  • Newt
  • Posts: 42
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  :|
..END OF LINE..

pBe

  • Bull Frog
  • Posts: 402
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 :)

cmwade77

  • Swamp Rat
  • Posts: 1443
Re: Cracking a SheetSet file(.dst) to view and edit values inside/oustide AutoCAD
« Reply #62 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.

cmwade77

  • Swamp Rat
  • Posts: 1443
Re: Cracking a SheetSet file(.dst) to view and edit values inside/oustide AutoCAD
« Reply #63 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.

nechtan3

  • Mosquito
  • Posts: 1
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
Thank you very muсh!
I'm using external hard drive and your work was very helpful for me.
Also I've found one issue. Cyrillic letter "н" changing to "Ѝ" while converting XML to DST. So Autocad doesn't recognize the sheet set. Anybody knows how can I fix this issue?
« Last Edit: February 17, 2021, 06:18:26 AM by nechtan3 »

karrotbear

  • Mosquito
  • Posts: 2
Thank you very muсh!
I'm using external hard drive and your work was very helpful for me.
Also I've found one issue. Cyrillic letter "н" changing to "Ѝ" while converting XML to DST. So Autocad doesn't recognize the sheet set. Anybody knows how can I fix this issue?

What I've found is there is no need to convert from XML back to dst. Simply rename the file from MyFile.xml to MyFile.dst and autocad will read it properly, and then promptly encode it again if you make a change etc.

I have run into a few issues regarding the GUID's, but I'll cross that bridge when I get to it. What I'm currently wanting to do is create a spreadsheet that can:

1. Read an existing .dst and populate a table for us to edit the relevant values
2. Create a new .dst that is readable by CAD (I've completed this part) and will allow you to nominate drawings and layouts to incorporate into the sheetset without opening CAD.

I'm not nearly ready yet but hopefully soon I'll have a solution (that I can share here too)