Skip to content
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

Is It Possible to remove a Pset's reference to a specific Property? #433

Closed
RyanDaley opened this issue Jul 19, 2022 · 2 comments
Closed

Comments

@RyanDaley
Copy link

RyanDaley commented Jul 19, 2022

Is It possible to remove a property from a Pset using xBim?

There are certain instances, where an IfcPropertySingleValue is being referenced by multiple Psets. However, I just want to remove the reference to this property from one Pset.

It would be the equivalent of removing this line reference from the Pset:

image

If I were to simply delete the property, then it is removed from all the other Psets as well.

Essentially, I wish it was possible to do this:

IIfcPropertySet propertySet = model.Instances.FirstOrDefault<IIfcPropertySet>(s => s.Name == pItem.Pset);
propertySet.RemoveProperty("myPropertyName");
@martin1cerny
Copy link
Member

Just use propertySet.HasProperties.Remove(property).

@RyanDaley
Copy link
Author

@martin1cerny , thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants