-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OpaqueMaterial to use clean_and_id_ep_string()
for identifier
#411
Comments
Hey @ed-p-may , Funny that we are coming back to this. The very first version of Ladybug Tools that I released did exactly what you suggested here but I got so much pushback from other users about the "random IDs added to the end of names" even when I gave everyone a component that lets them overwrite the ID of anything that they want. So, while I kept the auto-generated ID for geometry objects like Face and Room, I loosened the restriction for energy or radiance objects like constructions or modifiers. This system appeared to be (mostly) working well since the complaints about the "random IDs" have largely went away and, until now, I had not encountered anyone creating constructions or materials without knowing that they should give them unique names (or, if they are new users, they tend to leave the name blank, in which case a unique name is auto-generated). So given all of the rounds that this issue went thorough already, I would rather not change it again. How many users have you found making this mistake about not using unique ids? If it comes back a few times, then I'll concede that maybe we could change it again. |
Hi @chriswmackey , ha - things come full circle. That makes sense - I'm sure there are other ways to manage this issue - as you noted: the 'validate model' component is helpful once users know to add it into their GH files. I guess I'm surprised that anyone had an issue with the identifier string being ugly like that though? Wanting the Though I guess the |
Hi @ed-p-may,
The ugly identifiers won't bother you if you stay in the Ladybug Tools/Pollination ecosystem but once you export them to other platforms like EnergyPlus and OpenStudio or you want to write some measure or Python code that relies on the materials/construction names it starts to get noticed.
Yes. That's how it works. Using identifier will ensure the generated file will be valid. |
Hi,
In reference to the Post on the discourse forum: "Check for Duplicate Material Names":
User-messages are certainly helpful when this problem occurs, but a possible fix to avoid the issue entirely would be to use
clean_and_id_ep_string()
on the user-provided name instead of justclean_ep_string()
Existing:
honeybee-grasshopper-energy/honeybee_grasshopper_energy/src/HB Opaque Material.py
Proposed:
Unless there is another reason that the identifier and the display_name have to always be the same?
Example GH File:
material_test.gh.zip
The text was updated successfully, but these errors were encountered: