You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
Great job with this plugin. I have a problem when I create custom Psets. I have a PsetQuantityTakeOff dictionary but the values have no units when I import them in a IFC viewer. When I export to IFC all of them are converted to IFC Label.
Only if I change IfcQuantityLength by IfcLengthMeasure the export IFC has units (mm) although my model is in meters.
What have I do to have units in volumes and areas?
This is my code (where a, b, x y , z are calculated values):
ifcDict=instance.definition.attribute_dictionary("IFC 2x3")ifcQuantities=ifcDict.attribute_dictionary("PsetQuantityTakeOff",true)ifcQuantitiesNetVolume=ifcQuantities.attribute_dictionary("NetVolume",true)ifcQuantitiesNetVolume.set_attribute"IfcQuantityVolume","value",a.to_sifcQuantitiesNetVolume.set_attribute"IfcQuantityVolume","is_hidden",falseifcQuantitiesNetVolume.set_attribute"IfcQuantityVolume","attribute_type",FloatifcQuantitiesGrossVolume=ifcQuantities.attribute_dictionary("GrossVolume",true)ifcQuantitiesGrossVolume.set_attribute"IfcQuantityVolume","value",v.to_sifcQuantitiesGrossVolume.set_attribute"IfcQuantityVolume","is_hidden",falseifcQuantitiesGrossVolume.set_attribute"IfcQuantityVolume","attribute_type",FloatifcQuantitiesGrossFootprintArea=ifcQuantities.attribute_dictionary("GrossFootprintArea",true)ifcQuantitiesGrossFootprintArea.set_attribute"IfcQuantityArea","value",s.to_sifcQuantitiesGrossFootprintArea.set_attribute"IfcQuantityArea","is_hidden",falseifcQuantitiesGrossFootprintArea.set_attribute"IfcQuantityArea","attribute_type",FloatifcQuantitiesNominalLength=ifcQuantities.attribute_dictionary("NominalLength",true)ifcQuantitiesNominalLength.set_attribute"IfcQuantityLength","value",x.to_sifcQuantitiesNominalLength.set_attribute"IfcQuantityLength","is_hidden",falseifcQuantitiesNominalLength.set_attribute"IfcQuantityLength","attribute_type",FloatifcQuantitiesNominalWidth=ifcQuantities.attribute_dictionary("NominalWidth",true)ifcQuantitiesNominalWidth.set_attribute"IfcQuantityLength","value",y.to_sifcQuantitiesNominalWidth.set_attribute"IfcQuantityLength","is_hidden",falseifcQuantitiesNominalWidth.set_attribute"IfcQuantityLength","attribute_type",FloatifcQuantitiesNominalHeight=ifcQuantities.attribute_dictionary("NominalHeight",true)ifcQuantitiesNominalHeight.set_attribute"IfcQuantityLength","value",z.to_sifcQuantitiesNominalHeight.set_attribute"IfcQuantityLength","is_hidden",falseifcQuantitiesNominalHeight.set_attribute"IfcQuantityLength","attribute_type",FloatifcQuantities.set_attribute"Units","value","volume (m3) - area (m2) - length (m)"ifcQuantities.set_attribute"Units","is_hidden",falseifcQuantities.set_attribute"Units","attribute_type",String
Thanks in advance and sorry by my poor English
The text was updated successfully, but these errors were encountered:
Cool that you are diving in this deep into adding IFC properties!
On export I have to guess the best IFC type based on property name and ruby type (ia float, string) so all values that are not understood are mapped to the fallback type of IfcLabel, I could try to improve the "guessing" part, or maybe add additional "IFC manager specific" properties where one could write the IFC type, I have to think on that.
And for the meters vs millimeters, the IFC model units are hardcoded to mm at this time, would be nice to make that dependent on the curent Sketchup unit settings, but that would take some work...
Hi,
Great job with this plugin. I have a problem when I create custom Psets. I have a PsetQuantityTakeOff dictionary but the values have no units when I import them in a IFC viewer. When I export to IFC all of them are converted to IFC Label.
Only if I change IfcQuantityLength by IfcLengthMeasure the export IFC has units (mm) although my model is in meters.
What have I do to have units in volumes and areas?
This is my code (where a, b, x y , z are calculated values):
Thanks in advance and sorry by my poor English
The text was updated successfully, but these errors were encountered: