I have tried to follow the examples given in the handout and presentation given by Angel Velez in AU2013. I am trying to create an exporter based on the existing IFC exporter, and my goal is simply to add a custom propery set.
Here is what I have so far, and now I wonder where and what I call to include the new propery set to the export?
namespace EiBreIFC
{
public class EiBreExporter : Exporter
{
.....
.....
public EiBreExporter()
{
InitPropertySetRebar(); //How to add the new property set?
}
private static void InitPropertySetRebar(IList<PropertySetDescription> userDefinedPropertySets)
{
PropertySetDescription propertySetRebar = new PropertySetDescription();
propertySetRebar.Name = "REBAR";
propertySetRebar.EntityTypes.Add(IFCEntityType.IfcElement);
propertySetRebar.AddEntry(PropertySetEntry.CreateIdentifier("Rebar Number"));
userDefinedPropertySets.Add(propertySetRebar);
}
}
If someone has a more complete sample to share, that would be appreciated too!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
There's an easier way to add a property set now using the user-defined property set table. Still, I will take the above code in the spirit of "trying to make an exporter on top of the existing exporter". In this case, you want to make sure that you add something like this:
Thank you Angel! I know the easy way(s), but I was tired of mapping parameter values in Revit and manually remember to combine and calulate them before export. I was hoping to achieve this with the method above and a couple of PropertyCalculator Classes. Hopefully I'm on the right track here.
Example:
I want a IFC-propery to be a combination of the revit paramters"Partition" and "Rebar Number",
another calculated as Mass = Volume*7850
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have tried to follow the examples given in the handout and presentation given by Angel Velez in AU2013. I am trying to create an exporter based on the existing IFC exporter, and my goal is simply to add a custom propery set.
Here is what I have so far, and now I wonder where and what I call to include the new propery set to the export?
If someone has a more complete sample to share, that would be appreciated too!
Hi Einar,
There's an easier way to add a property set now using the user-defined property set table. Still, I will take the above code in the spirit of "trying to make an exporter on top of the existing exporter". In this case, you want to make sure that you add something like this:
This will add your property sets to the list.
Regards,
Angel
Thank you Angel! I know the easy way(s), but I was tired of mapping parameter values in Revit and manually remember to combine and calulate them before export. I was hoping to achieve this with the method above and a couple of PropertyCalculator Classes. Hopefully I'm on the right track here.
Example:
I want a IFC-propery to be a combination of the revit paramters"Partition" and "Rebar Number",
another calculated as Mass = Volume*7850
Sounds like the right track to me. Hopefully that trick works for you.