Getting Component List

We have an technical Application showing a Partlist as Tree from a Customers Order. For all Parts you can open a HSF File via DoubleClick.
In the CAD-Model from the Part you can mark a Component, so that the Component-Part-Nr. in the Tree under the Mainpart is highlighted. Or in other direction mark a Part in the Partlst and the Component in the CAD-Model is highlighted.
For the Relation Partlist <=> Model-Components we are building a Segment Map from a HSF-File from SolidWorks. We are using the Meta Data showing in the Segmentbrowser (Hoops WPF Sandbox 22.0.0.0 with a File from SolidWorks 2017):

We are using the Tags Configname, Path, Refname. Access Path see Screenshot. So we get the needed Information for Relation between Part-Nr. and Segments.

But no we have a Problem with newer HSF Files created with Solid Works 2022:

The Tags Configname, Path and Refname are now missed, so that we could not build the Segment Map in the same Way.

In an eModel Viewer we saw, that the Information must be anywehere:

Can you please show us a way to extract the Information from the HSF-File, so that our Appication is working correct again?
At the moment our Application is build with .Net 2 and uses Hoops 19.4.0.

Same Text with Picures / see Appendix

ESM.zip (238.6 KB)

Hi Stefan,

Can you please provide the HSF file referenced in the ESM.pdf. Ideally you could give us the file in a version that works in your application (pre-eDrawings 2022) and one that does not (post-eDrawings 2022 with breaking changes).

Thanks,

Rob

Hello Rob,

thank you for your anser.

here are the two Files:

File from Solid Work 2017, working: sw2017_eModel_11176491_Befestigungselement~00.hsf

File from Solid Work 2022, not working: sw2022_eModel_11176491_Befestigungselement~00.hsf

HSF_Files.zip (20.5 KB)

Hi Stefan,

we are not really in control of the edrawings format but from a cursory look it seems that the data you are looking for is now encoded as user options. (see screenshot). Does that make sense?

Guido

Hi Stefan,

You should be able retrieve the user data using the following API:

https://docs.techsoft3d.com/hps/latest/build/api_ref/cpp/class_h_p_s_1_1_segment_key.html#a31701ae51eadf9a955f6b0010038bae2

You’ll see a quick example at the bottom of this page:

https://docs.techsoft3d.com/hps/latest/build/prog_guide/0101_database.html#attributes

Rob

Thanks for your hints. We will check this.

We looked at the right place, bute the sgment browser downloaded with hoops runtime does not show this.

Yes. Its a bit of a shortcoming that our current viewers don’t actually show the value of the user data. The screenshot was taken with our old 3DF based Partviewer.

Hi Stefan,

I created a feature request on your behalf to add the ability to read the user data/options in the HDV. Hopefully with the above information, you can adjust your code to account for the change in the HSF output from eDrawings and in the future, hopefully the HDV can be used to inspect any changes.

Thanks at all,

yes, i think this is a solution.

With

     int laengeUserOptions;
      HCS.Show_User_Options_Length(out laengeUserOptions);
      StringBuilder textUserOptions = new StringBuilder(laengeUserOptions + 1);
      HCS.Show_User_Options(textUserOptions);

we get the UserOptions.

2 Likes

Hello,

is it possible to get a demo version from the 3D Viewer which show the “USER OPTIONS” Tag? Would be nice for us to have it for testing our changes.

Thanks!

Found a version in our licensed hoops version. The trick is here, that for some parts there a two Options (“USER OPTIONS” and “UNICODE OPTIONS”).