Creating IFC Data

From Vectorlab
Jump to: navigation, search


How to create and export IFC data, by Gerard Jonker.

In contrast to Vectorworks versions 12 to 2010 it is no longer necessary to create an IFC entity before the objects are exported. Just adding IFC data is enough. This can easily be done with the Vectorscript commands:

 Record(); 
SetRField();

A Good trick is to assign the Ifc Data through the menu command. Then export the file as a Vectorscript document. Copy and Paste the specific Ifc data parts of the code into your own code.

Unfortunately not all IFC data is exported (last test done: VW 2012 SP0). Keeping things simple may proof more productive than filling all specific fields of an object type and risking compatibility issues.

For instance the IFC records for the structural steel shapes nor the shapes are exported. It would be better to stick to IfcBeam, that doesn't require and subsequent fields to be filled in. Instead of:

 Record(hparm,'NNA_IfcIShapeProfileDef');
Field(hparm,'NNA_IfcIShapeProfileDef','prm0_name','ProfileType');
Field(hparm,'NNA_IfcIShapeProfileDef','prm0_type','8');
Field(hparm,'NNA_IfcIShapeProfileDef','prm0_value','AREA');
Field(hparm,'NNA_IfcIShapeProfileDef','prm1_name','ProfileName');
Field(hparm,'NNA_IfcIShapeProfileDef','prm1_type','7');
Field(hparm,'NNA_IfcIShapeProfileDef','prm1_value',Concat('HEA ', HEAprof));

Field(hparm,'NNA_IfcIShapeProfileDef','prm2_name','Position');
Field(hparm,'NNA_IfcIShapeProfileDef','prm2_type','1');
Field(hparm,'NNA_IfcIShapeProfileDef','prm2_value','0');

Field(hparm,'NNA_IfcIShapeProfileDef','prm3_name','OverallWidth');
Field(hparm,'NNA_IfcIShapeProfileDef','prm3_type','2');
Field(hparm,'NNA_IfcIShapeProfileDef','prm3_value',concat(b));
Field(hparm,'NNA_IfcIShapeProfileDef','prm4_name','OverallDepth');
Field(hparm,'NNA_IfcIShapeProfileDef','prm4_type','2');
Field(hparm,'NNA_IfcIShapeProfileDef','prm4_value',concat(h));
Field(hparm,'NNA_IfcIShapeProfileDef','prm5_name','WebThickness');
Field(hparm,'NNA_IfcIShapeProfileDef','prm5_type','2');
Field(hparm,'NNA_IfcIShapeProfileDef','prm5_value',concat(tw));
Field(hparm,'NNA_IfcIShapeProfileDef','prm6_name','FlangeThickness');
Field(hparm,'NNA_IfcIShapeProfileDef','prm6_type','2');
Field(hparm,'NNA_IfcIShapeProfileDef','prm6_value',concat(tf));
Field(hparm,'NNA_IfcIShapeProfileDef','prm7_name','FilletRadius');
Field(hparm,'NNA_IfcIShapeProfileDef','prm7_type','2');
Field(hparm,'NNA_IfcIShapeProfileDef','prm7_value',concat(r));

Which isn't exported at all. BTW this isn't a Vectorscript problem. Even if you assign the Ifc data through the menu command it will not export.

Gerard Jonker --Gerard Jonker 02:30, 11 October 2011 (MEST)