ChrisClems / EdgeSharp

A library of helpers and extensions for the Solid Edge API. A spiritual successor to SolidEdge.Community build on modern .NET to make Solid Edge interop less frustrating.
MIT License
1 stars 0 forks source link

Modify document-type-specific options that are not exposed via API #13

Closed ChrisClems closed 1 month ago

ChrisClems commented 2 months ago

Config options like Flat Pattern Treatments to reduce bsplines to lines and arcs are not exposed via the API in any way. They're also saved at the document level so they cannot be bulk modified by changing defaults. We need a way to modify these options programmatically to operate on large sets of files.

Options are suspected to be stored in the PSMcluster0 stream in the COM structured storage of the document file.

PSMcluster.zip

PSMclusterVariance.zip

PSMcluster0-off.zip

rmcanany commented 1 month ago

@ChrisClems I ran across an old post on the SE Forum that used SendKeys to do something not exposed in the API.

It's far from ideal, but might be easier than hacking a binary stream in Windows Structured Storage.

ChrisClems commented 1 month ago

@ChrisClems I ran across an old post on the SE Forum that used SendKeys to do something not exposed in the API.

It's far from ideal, but might be easier than hacking a binary stream in Windows Structured Storage.

Yeah, I hit some big dead ends with the structured storage streams. Every time I found something promising it would go nowhere without a deeper understanding of how the different streams appear to interact. Changing a simple value would change binary code all over the place. Saving a file with no changes would change far more in the binary than one would expect for simple timestamps, rev bump, etc. Maybe if I had a Parasolid SDK license I could poke around in the parasolid stream, but the x_b format is not documented and they're not even using simple x_b's for the parasolid. They're partitions and deltas which appear are individual parts of a complete x_b.

I think it's safe to close this as not planned for now. I'm at the end of my rope without spending a year or two studying reverse engineering and I'm in no hurry to go back to school.