rmcanany / SolidEdgeHousekeeper

Utility for finding annoying little errors in your Solid Edge project
MIT License
23 stars 10 forks source link

Localized system properties #109

Closed farfilli closed 2 months ago

farfilli commented 3 months ago

There is an issue with the System.Title and other "named" properties. If you have a localized Solid Edge, those properties will be translated into the user language. The actual method looks for the exact name and it will return a property not found error.

A possible solution would be to create a map SystemPropertyName --> PropertyIndex and use the index to get the correct property. This issue is present only when editing properties through Solid Edge; the structured storage method is not affected.

rmcanany commented 3 months ago

Sounds like a good idea to me. That must be a recent change. I had a user early on who discovered he had to use English for those properties, even though they were presented in Polish in SE.

rmcanany commented 3 months ago

I recently saw a list of system properties that SE actually supports. Was that from you?

Also, the property indices you mention, would those be the item number in whatever stream holds the property, or something else?

farfilli commented 3 months ago

I have created the list in combo box for system properties, but not created a mapped index to use in the PropertySet Structured storage is always in English so the problem occurs only when edit on Solid Edge

farfilli commented 3 months ago

Yes with index I mean the item number in its PropertySet

farfilli commented 2 months ago

fixed with #118 I haven't created a specific function that returns the property but wrote it directly inside the GetProp sub. It may be useful for other usage to create a proper function.

rmcanany commented 2 months ago

Did a quick test and all seems to be working. I'll do some more before I close this out.

I added Material and Sheet Metal Gage to the checks in GetProp.

In TaskEditProperties, at one point I have: If (PropertyName.ToLower = "material") And (PropertySetName.ToLower = "system") Correct me if I'm wrong, but since the ComboBox entries are in English, this should still work even if a user is running in Localized mode, right?

farfilli commented 2 months ago

Yes, It works and you don't need the toLower statement as the combo box entries are not editable.

The problem is on the property name that SolidEdge APIs returns localized and therefore you need the mapping.

Material it's a strange beast anyway. Even if through API is present in the PropertySet it's not in the UI and not in the Structured Storage. Said that I don't know if it come localized or not, I have to check it but can't till next Tuesday.

farfilli commented 2 months ago

It's gonna be a huge release the next one 😀🔝

rmcanany commented 2 months ago

@farfilli When you get to it, let me know what you find about the language for Material, etc. If they're localized, I have a few things to fix.

farfilli commented 2 months ago

@rmcanany the property Material is not localized and it is in MechanicalModelling.Item(1)

rmcanany commented 2 months ago

OK. Thank you.

Same with the rest of them, too? (Density, Coefficient of Thermal Expansion, etc.)

farfilli commented 2 months ago

That's a mix of translated and English. I will send you a screenshot tomorrow, not in front of PC now.

I was thinking that for standard properties we could map them all, there will be no need to find them in this way.

rmcanany commented 2 months ago

Yeah, mapping them sounds like better way to go. I'll look into it.

farfilli commented 2 months ago

I have highlighted the localized properties; by the way density is not part of the properties but its an exposed variable image image

rmcanany commented 2 months ago

Very helpful. Thank you!

rmcanany commented 2 months ago

@farfilli @ChrisClems @lrmoreno007

Hey All, I'm going to take a look at this today. Once this one is fixed, I think we're ready to do a release. I have been working on the release notes. When you get a chance, please look over your sections and let me know if I got anything wrong or left anything out. Thank you!

farfilli commented 2 months ago

@rmcanany on release notes the link on DirectEdit leads to the wrong position.

Thoughts: To be able to implement the expression editor I have used those 2 components:

To be able to implement the Direct edit of properties I have used this component:

I would check on license terms if you need to mention them on the ReadMe; I would mention them anyway they are all great components

rmcanany commented 2 months ago

Good points, especially about the external components. I'll get that fixed.

rmcanany commented 2 months ago

Superseded with https://github.com/rmcanany/SolidEdgeHousekeeper/issues/123. Closing.