About Building & Civil ResourcesThe xml files from the directories indicated in the table above are used when there are no files referenced in Data Setup. A building & civil resource is an XML document that describes building and civil
objects along with their expected behaviors at creation and in edition mode. Sample
files are available in Note:
For more information, see About Adding Customized Extensions in Building & Civil Assemblies.
XML File Example <BusinessObject name = "AecDoor">
<BaseExtensions>
<BaseExtension default = "true" exposed = "true" name = "IfcDoor"/>
<BaseExtension exposed = "true" name = "IfcDoorStandardCase"/>
</BaseExtensions>
<Extension level = "100" name = "OmniClass"/>
<Extension level = "100" name = "UniFormatBuilding"/>
<Extension deletable = "true" exposed = "true" level = "100" name = "IfcPset_DoorCommon"/>
<Extension deletable = "true" level = "300" name = "IfcPset_DoorWindowGlazingType"/>
<Extension deletable = "true" level = "300" name = "IfcPset_DoorWindowShadingType"/>
<Extension deletable = "true" level = "300" name = "IfcPset_ConcreteElementGeneral"/>
<Extension deletable = "true" level = "300" name = "IfcPset_PrecastConcreteElementFabrication"/>
<Extension deletable = "true" level = "300" name = "IfcPset_PrecastConcreteElementGeneral"/>
<Extension deletable = "true" level = "300" name = "IfcPset_Condition"/>
<Extension deletable = "true" level = "300" name = "IfcPset_EnvironmentalImpactIndicators"/>
<Extension deletable = "true" level = "300" name = "IfcPset_EnvironmentalImpactValues"/>
<Extension deletable = "true" level = "300" name = "IfcPset_ManufacturerOccurrence"/>
<Extension deletable = "true" level = "300" name = "IfcPset_ManufacturerTypeInformation"/>
<Extension deletable = "true" level = "300" name = "IfcPset_PackingInstructions"/>
<Extension deletable = "true" level = "300" name = "IfcPset_ServiceLife"/>
<Extension deletable = "true" level = "300" name = "IfcPset_Warranty"/>
<Extension deletable = "true" exposed = "true" level = "100" name = "IfcQto_DoorBaseQuantities"/>
</BusinessObject>
Description of XML ElementsThe table below describes elements and their possible attributes.
With the BIM Completeness command, you can check extensions according to the given LOD above, and identify the lacks of information (attributes). You can also analyze the mockup from a global point of view within the Building & Civil Assemblies app. Supported Standards
Alignment Design Rules Definition
Alignment Design CustomizationThe script below is a stationing script.
If no XML resource file is set in Data Setup, the AlignmentDesign.xml file delivered in
<AlignmentDesign>
<Units>
<DefaultValues>
<!-- Default values are used while creating a new alignment, road/railway surface, road/railway design -->
<!-- Ulterior Data Setup modifications do not impact existing entities -->
<Speed value="km_h"/> <!--km_h, mph-->
<Gradient value="%_angle"/> <!--%_angle, m_m, deg, rad, grad, in_ft--> <!-- NOT USED -->
<Superelevation value="%_angle"/> <!--%_angle, m_m, deg, rad, grad, in_ft-->
<Cant value="%_angle"/> <!--%_angle, m_m, deg, rad, grad, in_ft--> <!-- NOT USED -->
<CrossSection>
<SmallAngle value="%_angle"/> <!--%_angle, m_m, deg, rad, grad, in_ft-->
<LargeAngle value="m_m"/> <!--%_angle, m_m, deg, rad, grad, in_ft-->
<LimitSmallLarge value="20%_angle"/>
</CrossSection>
</DefaultValues>
</Units>
<General>
<AutomaticCreation>
<VerticalInflectionPoint value ="true"/>
</AutomaticCreation>
</General>
<Stationings>
<!-- Default values are used while creating a new alignment or the first stationing -->
<!-- Ulterior Data Setup modifications do not impact existing alignments or stationings -->
<DefaultValues>
<MajorInterval value="100m"/>
<!-- Can be expressed in any length unit e.g. "100 feet"-->
<MinorInterval value="20m"/>
<!-- Can be expressed in any length unit e.g. "100 feet"-->
<StationTextHeightRatio value="0.02"/>
<!-- Expressed as a ratio of the MajorInterval-->
<StationOffsetRatio value="1"/>
<!-- Offset between the alignment and the station text. Expressed as a ratio of TextHeight -->
</DefaultValues>
<!-- Global values are shared among all alignments contained in a given PLM representation -->
<!-- They are stored in this representation during the first alignment creation -->
<!-- Ulterior Data Setup modifications do not impact PLM representations in which alignments were already created -->
<GlobalValues>
<!-- Alignment -->
<LockIntervals value="false"/>
<!-- true: Major\Minor intervals parameter cannot be edited -->
<!-- Numbers -->
<LengthDecimalPlaces value="3"/>
<LengthDisplayTrailingZeros value="false"/>
<!-- Station annotation -->
<StationTailRatio value="1"/>
<!-- Expressed as a ratio of the TextHeight -->
<StationOverrunRatio value="1"/>
<!-- Expressed as a ratio of the TextHeight -->
<!-- Station equation annotation -->
<StationEquationBackLabel value="@unset"/>
<!-- @unset to have an internationalized value equivalent to 'BACK' -->
<StationEquationAheadLabel value="@unset"/>
<!-- @unset to have an internationalized value equivalent to 'AHEAD' -->
<StationEquationSideOffsetRatio value="1"/>
<!-- Expressed as a ratio of the TextHeight -->
<StationEquationTailRatio value="1"/>
<!-- Expressed as a ratio of the TextHeight -->
<StationEquationOverrunRatio value="1"/>
<!-- Expressed as a ratio of the TextHeight -->
</GlobalValues>
</Stationings>
</AlignmentDesign>where:
Concrete Design Customization
Rebar Shape Code Computation/*================================================================================
/* ConcreteRebarShapeCode_BS.CATRule
/*
/* Compute of the bar shape code according to the British Standard (BS 8666:2005)
/* User can customize this file for each project.
/*
/* ================================================================================
/*
/*
/* ===============================================================================
/* Parameters */
let input(AECRebarLayer)
set input = ThisObject
/*Global var*/
let AreAllBarsIdentical(Boolean)
let BarDiameter(Length)
let BarLength(Length)
let i, NbBars(Integer)
/*tols*/
let tol_for_length(LENGTH)
let tol_for_angle(ANGLE)
/*output*/
let BendingShapeCodes(List)
/*Retrieve tol*/
tol_for_length = input.GetLengthTolerance()
tol_for_angle = input.GetAngularTolerance()
/*Globals*/
AreAllBarsIdentical = input.AreAllBarsIdentical()
NbBars = input.GetNumberOfBars()
BarLength = input.GetAttributeReal("BarLength")*1m
BarDiameter = input.GetAttributeReal("Physical diameter")*1m
if (AreAllBarsIdentical == true)
{
NbBars = 1
}
i=1
for i while i <= NbBars
{
let IsPlanar(Boolean)
let nb_segments, nb_arcs(Integer)
let BarElements(List)
let bar_geo(AECRebarSingleBar)
let CurrentSC(Integer)
let IsHelix (Boolean)
CurrentSC = 99
set bar_geo = input.GetBar(i)
set IsHelix = bar_geo.GetAttributeBoolean("IsAnHelix")
set nb_segments = bar_geo.GetAttributeInteger("NbSegments")
set nb_arcs = bar_geo.GetAttributeInteger("NbArcs")
set BarElements = bar_geo.GetAttributeObject("BarElements")
set IsPlanar = bar_geo.GetAttributeBoolean("IsPlanar")
if (IsHelix == true)
{
CurrentSC = 77
}
else if (IsPlanar == true)
{
let NbElements(Integer)
set NbElements = BarElements.Size()
if(NbElements == 1 and nb_arcs == 1)
{
/*FIXME!!!*/
let BarElem(AECRebarSingleBarSection)
let BarAngle(Angle)
set BarElem=BarElements[1]
BarAngle = BarElem.GetAttributeReal("Angle")*1deg
if(BarAngle < 180deg - tol_for_angle)
{
CurrentSC = 67
}
else
{
CurrentSC = 75
}
}
else if (NbElements == 1 and nb_segments == 1)
{
let BarElem(AECRebarSingleBarSection)
let BarVec(Vector)
let currentBarLength(LENGTH)
set BarElem=BarElements[1]
CurrentSC = 0
/*shape code depend on bar length*/
set currentBarLength = BarElem.GetAttributeReal("BarLength")*1mm
if (abs(currentBarLength - BarLength) < tol_for_length)
{
CurrentSC = 1
}
}
else if(nb_segments == 2 and nb_arcs == 1)
{
let BarElem(AECRebarSingleBarSection)
let BarRadius(Length)
let BarAngle(Angle)
set BarElem=BarElements[2]
set BarRadius = BarElem.GetAttributeReal("Radius")*1mm
set BarAngle = BarElem.GetAttributeReal("Angle")*1deg
/*make sure it is circular*/
if(BarRadius > 0mm)
{
/*right angle ?*/
if(abs(BarAngle - 90deg) < tol_for_angle or abs(BarAngle - (-90deg)) < tol_for_angle)
{
let BarElemPrev, BarElemNext(AECRebarSingleBarSection)
let A, B, Threshold(Length)
let VecBarPrevious, VecBarNext(Vector)
set BarElemPrev = BarElements[1]
set BarElemNext = BarElements[3]
set Threshold = BarRadius + 6 * BarDiameter
set A = BarElemPrev.GetAttributeReal("BarLength")*1mm + BarRadius
set B = BarElemNext.GetAttributeReal("BarLength")*1mm + BarRadius
if (A < Threshold or B < Threshold)
{
CurrentSC = 11
}
else
{
CurrentSC = 12
}
}
else if( abs(BarAngle - 180deg) < tol_for_angle )
{
CurrentSC = 13
}
else if( ( BarAngle > 0 and BarAngle < 90deg - tol_for_angle ) or ( BarAngle < 0 and BarAngle > -90deg + tol_for_angle) )
{
CurrentSC = 15
}
else if( ( BarAngle > 0 and BarAngle > 90deg + tol_for_angle ) or ( BarAngle < 0 and BarAngle < -90deg - tol_for_angle) )
{
CurrentSC = 14
}
}
}
else if(nb_segments == 3 and nb_arcs == 2)
{
let BarElem1, BarElem2(AECRebarSingleBarSection)
let BarRadius1, BarRadius2(Length)
let BarAngle1, BarAngle2(Angle)
set BarElem1=BarElements[2]
set BarElem2=BarElements[4]
set BarRadius1 = BarElem1.GetAttributeReal("Radius")*1mm
set BarAngle1 = BarElem1.GetAttributeReal("Angle")*1deg
set BarRadius2 = BarElem2.GetAttributeReal("Radius")*1mm
set BarAngle2 = BarElem2.GetAttributeReal("Angle")*1deg
if((abs(BarAngle1 - 90deg) < tol_for_angle and abs(BarAngle2 - 90deg) < tol_for_angle ) or (abs(BarAngle1 - (-90deg)) < tol_for_angle and abs(BarAngle2 - (-90deg)) < tol_for_angle))
{
CurrentSC = 21
}
else if((abs(BarAngle1 - 180deg) < tol_for_angle and abs(BarAngle2 - 90deg) < tol_for_angle ) or
(abs(BarAngle1 - (-90deg)) < tol_for_angle and abs(BarAngle2 - 180deg) < tol_for_angle) or
(abs(BarAngle2 - 180deg) < tol_for_angle and abs(BarAngle1 - 90deg) < tol_for_angle ) or
(abs(BarAngle2 - (-90deg)) < tol_for_angle and abs(BarAngle1 - 180deg) < tol_for_angle))
{
CurrentSC = 22
}
else if((abs(BarAngle1 - 90deg) < tol_for_angle and abs(BarAngle2 - (-90deg)) < tol_for_angle ) or
(abs(BarAngle1 - (-90deg)) < tol_for_angle and abs(BarAngle2 - 90deg) < tol_for_angle))
{
CurrentSC = 23
}
else if(( BarAngle1 > 0 and BarAngle2 > 0 and BarAngle1 < 90deg - tol_for_angle and BarAngle2 < 90deg - tol_for_angle) or
( BarAngle1 < 0 and BarAngle2 < 0 and BarAngle1 > -90deg + tol_for_angle and BarAngle2 > -90deg + tol_for_angle))
{
let TotalAngle(Angle)
TotalAngle = abs(BarAngle1) + abs(BarAngle2)
if (abs(TotalAngle - 90deg) < tol_for_angle)
{
CurrentSC = 24
}
else
{
CurrentSC = 25
}
}
else if(( BarAngle1 > 0 and BarAngle2 < 0 and BarAngle1 < 90deg - tol_for_angle and BarAngle2 > -90deg + tol_for_angle) or
( BarAngle1 < 0 and BarAngle2 > 0 and BarAngle1 > -90deg + tol_for_angle and BarAngle2 < 90deg + tol_for_angle))
{
if(abs(BarAngle1 + BarAngle2) < tol_for_angle)
{
CurrentSC = 26
}
}
else if((BarAngle1 > 0 and BarAngle2 > 0 and BarAngle1 < 90deg - tol_for_angle and abs(BarAngle2 - 90deg) < tol_for_angle) or
(BarAngle1 > 0 and BarAngle2 > 0 and BarAngle2 < 90deg - tol_for_angle and abs(BarAngle1 - 90deg) < tol_for_angle) or
(BarAngle1 < 0 and BarAngle2 < 0 and BarAngle1 > -90deg + tol_for_angle and abs(BarAngle2 - (-90deg)) < tol_for_angle) or
(BarAngle1 < 0 and BarAngle2 < 0 and BarAngle2 > -90deg + tol_for_angle and abs(BarAngle1 - (-90deg)) < tol_for_angle))
{
CurrentSC = 27
}
else if((BarAngle1 > 0 and BarAngle2 < 0 and BarAngle1 < 90deg - tol_for_angle and abs(BarAngle2 - (-90deg)) < tol_for_angle) or
(BarAngle1 < 0 and BarAngle2 > 0 and BarAngle2 < 90deg - tol_for_angle and abs(BarAngle1 - (-90deg)) < tol_for_angle) or
(BarAngle1 < 0 and BarAngle2 > 0 and BarAngle1 > -90deg + tol_for_angle and abs(BarAngle2 - (90deg)) < tol_for_angle) or
(BarAngle1 > 0 and BarAngle2 < 0 and BarAngle2 > -90deg + tol_for_angle and abs(BarAngle1 - (90deg)) < tol_for_angle))
{
CurrentSC = 28
}
else if((BarAngle1 > 0 and BarAngle2 > 0 and BarAngle1 < 90deg - tol_for_angle and BarAngle2 > 90deg + tol_for_angle) or
(BarAngle1 > 0 and BarAngle2 > 0 and BarAngle2 < 90deg - tol_for_angle and BarAngle1 > 90deg + tol_for_angle) or
(BarAngle1 < 0 and BarAngle2 < 0 and BarAngle1 < -90deg - tol_for_angle and BarAngle2 > -90deg + tol_for_angle) or
(BarAngle1 < 0 and BarAngle2 < 0 and BarAngle2 < -90deg - tol_for_angle and BarAngle1 > -90deg + tol_for_angle))
{
if(abs(abs(BarAngle1 + BarAngle2) - 180deg) < tol_for_angle)
{
CurrentSC = 29
}
}
}
else if(nb_segments == 4 and nb_arcs == 3)
{
let BarElem1, BarElem2, BarElem3(AECRebarSingleBarSection)
let BarAngle1, BarAngle2, BarAngle3(Angle)
set BarElem1=BarElements[2]
set BarElem2=BarElements[4]
set BarElem3=BarElements[6]
set BarAngle1 = BarElem1.GetAttributeReal("Angle")*1deg
set BarAngle2 = BarElem2.GetAttributeReal("Angle")*1deg
set BarAngle3 = BarElem3.GetAttributeReal("Angle")*1deg
if((abs(BarAngle1 - 90deg) < tol_for_angle and abs(BarAngle2 - 90deg) < tol_for_angle and abs(BarAngle3 - 90deg) < tol_for_angle) or
(abs(BarAngle1 - (-90deg)) < tol_for_angle and abs(BarAngle2 - (-90deg)) < tol_for_angle and abs(BarAngle3 - (-90deg)) > tol_for_angle))
{
CurrentSC = 31
}
if((BarAngle1 > 0 and BarAngle2 > 0 and BarAngle3 < 0 and abs(BarAngle1 - 90deg) < tol_for_angle and abs(BarAngle2 - 90deg) < tol_for_angle and abs(BarAngle3 - (-90deg)) < tol_for_angle) or
(BarAngle1 < 0 and BarAngle2 < 0 and BarAngle3 > 0 and abs(BarAngle1 - (-90deg)) < tol_for_angle and abs(BarAngle2 - (-90deg)) < tol_for_angle and abs(BarAngle3 - 90deg) > tol_for_angle) or
(BarAngle3 > 0 and BarAngle2 > 0 and BarAngle1 < 0 and abs(BarAngle3 - 90deg) < tol_for_angle and abs(BarAngle2 - 90deg) < tol_for_angle and abs(BarAngle1 - (-90deg)) < tol_for_angle) or
(BarAngle3 < 0 and BarAngle2 < 0 and BarAngle1 > 0 and abs(BarAngle3 - (-90deg)) < tol_for_angle and abs(BarAngle2 - (-90deg)) < tol_for_angle and abs(BarAngle1 - 90deg) > tol_for_angle))
{
CurrentSC = 32
}
if((BarAngle1 > 0 and BarAngle2 > 0 and BarAngle3 > 0 and abs(BarAngle1 - 180deg) < tol_for_angle and abs(BarAngle2 - 180deg) < tol_for_angle and abs(BarAngle3 - 180deg) < tol_for_angle) or
(BarAngle1 < 0 and BarAngle2 < 0 and BarAngle3 < 0 and abs(BarAngle1 - (-180deg)) < tol_for_angle and abs(BarAngle2 - (-180deg)) < tol_for_angle and abs(BarAngle3 - (-180deg)) > tol_for_angle))
{
let Bar1, Bar2, FirstSegment, LastSegment(AECRebarSingleBarSection)
let BarLength1, BarLength2, FirstSegmentLength, LastSegmentLength, ArcRadius1, ArcRadius2, ArcRadius3(Length)
set Bar1 = BarElements[3]
set Bar2 = BarElements[5]
set FirstSegment = BarElements[1]
set LastSegment = BarElements[BarElements.Size()]
set ArcRadius1 = BarElem1.GetAttributeReal("Radius")*1mm
set ArcRadius2 = BarElem2.GetAttributeReal("Radius")*1mm
set ArcRadius3 = BarElem3.GetAttributeReal("Radius")*1mm
BarLength1 = Bar1.GetAttributeReal("BarLength")*1mm
BarLength2 = Bar2.GetAttributeReal("BarLength")*1mm
FirstSegmentLength = FirstSegment.GetAttributeReal("BarLength")*1mm
LastSegmentLength = LastSegment.GetAttributeReal("BarLength")*1mm
/* TODO : add radius check */
if(abs(BarLength1 - BarLength2) < tol_for_length and abs(FirstSegmentLength - LastSegmentLength ) < tol_for_length and abs(ArcRadius1 - ArcRadius2) < 11mm and abs(ArcRadius1 - ArcRadius3) < 11mm)
{
CurrentSC = 33
}
}
if((BarAngle1 > 0 and BarAngle2 > 0 and BarAngle3 < 0 and abs(BarAngle1 - 90deg) < tol_for_angle and BarAngle2 < 90deg - tol_for_angle and BarAngle3 > -90deg + tol_for_angle) or
(BarAngle1 < 0 and BarAngle2 < 0 and BarAngle3 > 0 and abs(BarAngle1 - (-90deg)) < tol_for_angle and BarAngle2 > -90deg + tol_for_angle and BarAngle3 < 90deg - tol_for_angle) or
(BarAngle3 > 0 and BarAngle2 > 0 and BarAngle1 < 0 and abs(BarAngle3 - 90deg) < tol_for_angle and BarAngle2 < 90deg - tol_for_angle and BarAngle1 > -90deg + tol_for_angle) or
(BarAngle3 < 0 and BarAngle2 < 0 and BarAngle1 > 0 and abs(BarAngle3 - (-90deg)) < tol_for_angle and BarAngle2 > -90deg + tol_for_angle and BarAngle1 < 90deg - tol_for_angle))
{
CurrentSC = 34
}
if((BarAngle1 > 0 and BarAngle2 < 0 and BarAngle3 > 0 and BarAngle1 < 90deg - tol_for_angle and BarAngle2 > -90deg + tol_for_angle and abs(BarAngle3 - 90deg) < tol_for_angle) or
(BarAngle1 < 0 and BarAngle2 > 0 and BarAngle3 < 0 and BarAngle1 > -90deg + tol_for_angle and BarAngle2 < 90deg - tol_for_angle and abs(BarAngle3 - (-90deg)) < tol_for_angle) or
(BarAngle3 > 0 and BarAngle2 < 0 and BarAngle1 > 0 and BarAngle3 < 90deg - tol_for_angle and BarAngle2 > -90deg + tol_for_angle and abs(BarAngle1 - 90deg) < tol_for_angle) or
(BarAngle3 < 0 and BarAngle2 > 0 and BarAngle1 < 0 and BarAngle3 > -90deg + tol_for_angle and BarAngle2 < 90deg - tol_for_angle and abs(BarAngle1 - (-90deg)) < tol_for_angle))
{
CurrentSC = 35
}
if((BarAngle1 > 0 and BarAngle2 > 0 and BarAngle3 > 0 and abs(BarAngle1 - 90deg ) < tol_for_angle and abs(BarAngle2 - 90deg) < tol_for_angle and BarAngle3 < 90deg - tol_for_angle) or
(BarAngle1 < 0 and BarAngle2 < 0 and BarAngle3 < 0 and abs(BarAngle1 - (-90deg) ) < tol_for_angle and abs(BarAngle2 - (-90deg)) < tol_for_angle and BarAngle3 > -90deg + tol_for_angle) or
(BarAngle3 > 0 and BarAngle2 > 0 and BarAngle1 > 0 and abs(BarAngle3 - 90deg ) < tol_for_angle and abs(BarAngle2 - 90deg) < tol_for_angle and BarAngle1 < 90deg - tol_for_angle) or
(BarAngle3 < 0 and BarAngle2 < 0 and BarAngle1 < 0 and abs(BarAngle3 - (-90deg) ) < tol_for_angle and abs(BarAngle2 - (-90deg)) < tol_for_angle and BarAngle1 > -90deg + tol_for_angle))
{
CurrentSC = 36
}
}
else if(nb_segments == 5 and nb_arcs == 4)
{
let BarElem1, BarElem2, BarElem3, BarElem4(AECRebarSingleBarSection)
let BarRadius1, BarRadius2, BarRadius3, BarRadius4(Length)
let BarAngle1, BarAngle2, BarAngle3, BarAngle4(Angle)
set BarElem1=BarElements[2]
set BarElem2=BarElements[4]
set BarElem3=BarElements[6]
set BarElem4=BarElements[8]
set BarRadius1 = BarElem1.GetAttributeReal("Radius")*1mm
set BarAngle1 = BarElem1.GetAttributeReal("Angle")*1deg
set BarRadius2 = BarElem2.GetAttributeReal("Radius")*1mm
set BarAngle2 = BarElem2.GetAttributeReal("Angle")*1deg
set BarRadius3 = BarElem3.GetAttributeReal("Radius")*1mm
set BarAngle3 = BarElem3.GetAttributeReal("Angle")*1deg
set BarRadius4 = BarElem4.GetAttributeReal("Radius")*1mm
set BarAngle4 = BarElem4.GetAttributeReal("Angle")*1deg
if((abs(BarAngle1 - 90deg) < tol_for_angle and abs(BarAngle2 - 90deg) < tol_for_angle and abs(BarAngle3 - 90deg) < tol_for_angle and abs(BarAngle4 - 90deg) < tol_for_angle) or
(abs(BarAngle1 - (-90deg)) < tol_for_angle and abs(BarAngle2 - (-90deg)) < tol_for_angle and abs(BarAngle3 - (-90deg)) > tol_for_angle and abs(BarAngle4 - (-90deg)) > tol_for_angle))
{
CurrentSC = 41
}
else if((abs(BarAngle1 - 90deg) < tol_for_angle and abs(BarAngle2 - (-90deg)) < tol_for_angle and abs(BarAngle3 - (-90deg)) < tol_for_angle and abs(BarAngle4 - 90deg) < tol_for_angle) or
(abs(BarAngle1 - (-90deg)) < tol_for_angle and abs(BarAngle2 - (90deg)) < tol_for_angle and abs(BarAngle3 - (90deg)) > tol_for_angle and abs(BarAngle4 - (-90deg)) > tol_for_angle))
{
CurrentSC = 44
}
else if((BarAngle1 > 0 and BarAngle2 < 0 and BarAngle3 <0 and BarAngle4 > 0 and BarAngle1 < 90deg - tol_for_angle and BarAngle2 > (-90deg) + tol_for_angle and BarAngle3 > (-90deg) + tol_for_angle and BarAngle4 < 90deg - tol_for_angle) or
(BarAngle1 < 0 and BarAngle2 > 0 and BarAngle3 >0 and BarAngle4 < 0 and BarAngle1 > -90deg + tol_for_angle and BarAngle2 < (90deg) - tol_for_angle and BarAngle3 < (90deg) - tol_for_angle and BarAngle4 > -90deg + tol_for_angle))
{
if(abs(BarAngle1 - BarAngle4) < tol_for_angle and abs(BarAngle2 - BarAngle3) < tol_for_angle)
{
let Bar1, Bar2(AECRebarSingleBarSection)
let BarLength1, BarLength2(Length)
set Bar1 = BarElements[3]
set Bar2 = BarElements[7]
BarLength1 = Bar1.GetAttributeReal("BarLength")*1mm
BarLength2 = Bar2.GetAttributeReal("BarLength")*1mm
if(abs(BarLength1 - BarLength2) < tol_for_length)
{
CurrentSC = 46
}
}
}
else if((BarAngle1 > 0 and BarAngle2 > 0 and BarAngle3 > 0 and BarAngle4 > 0 and abs( BarAngle1 - 180deg ) < tol_for_angle and abs( BarAngle2 - 90deg) < tol_for_angle and abs(BarAngle3 - 90deg) < tol_for_angle and abs(BarAngle4 -180deg ) < tol_for_angle) or
(BarAngle1 < 0 and BarAngle2 < 0 and BarAngle3 < 0 and BarAngle4 < 0 and abs( BarAngle1 - (-180deg) ) < tol_for_angle and abs( BarAngle2 - (-90deg)) < tol_for_angle and abs(BarAngle3 - (-180deg)) < tol_for_angle and abs(BarAngle4 - (-180deg) ) < tol_for_angle))
{
let BarSegment1, BarSegment2(AECRebarSingleBarSection)
let BarLength1, BarLength2(Length)
set BarSegment1 = BarElements[3]
set BarSegment2 = BarElements[7]
BarLength1 = BarSegment1.GetAttributeReal("BarLength")*1mm
BarLength2 = BarSegment2.GetAttributeReal("BarLength")*1mm
if(abs(BarLength1 - BarLength2) < tol_for_length)
{
let FirstSegment, LastSegment(AECRebarSingleBarSection)
let FirstSegmentLength, LastSegmentLength(Length)
set FirstSegment = BarElements[1]
set LastSegment = BarElements[BarElements.Size()]
FirstSegmentLength = FirstSegment.GetAttributeReal("BarLength")*1mm
LastSegmentLength = LastSegment.GetAttributeReal("BarLength")*1mm
if(FirstSegmentLength < BarLength1 and LastSegmentLength < BarLength1 and abs(FirstSegmentLength - LastSegmentLength) < tol_for_length)
{
CurrentSC = 47
}
}
}
}
else if(nb_segments == 6 and nb_arcs == 5)
{
let FirstBend, LastBend(AECRebarSingleBarSection)
let FirstBendAngle, LastBendAngle(Angle)
set FirstBend=BarElements[2]
set LastBend=BarElements[BarElements.Size() - 1]
set FirstBendAngle = FirstBend.GetAttributeReal("Angle")*1deg
set LastBendAngle = LastBend.GetAttributeReal("Angle")*1deg
if((abs(FirstBendAngle - 90deg) < tol_for_angle and abs(LastBendAngle - 90deg) < tol_for_angle))
{
let InternalBend1, InternalBend2, InternalBend3(AECRebarSingleBarSection)
let InternalAngle1, InternalAngle2, InternalAngle3(Angle)
set InternalBend1=BarElements[4]
set InternalBend2=BarElements[6]
set InternalBend3=BarElements[8]
set InternalAngle1 = InternalBend1.GetAttributeReal("Angle")*1deg
set InternalAngle2 = InternalBend2.GetAttributeReal("Angle")*1deg
set InternalAngle3 = InternalBend3.GetAttributeReal("Angle")*1deg
if(abs(InternalAngle1 - 90deg) < tol_for_angle and abs(InternalAngle2 - 90deg) < tol_for_angle and abs(InternalAngle3 - 90deg) < tol_for_angle )
{
/*check lengths*/
let FirstSegment, SegmentSide11, SegmentSide12, SegmentSide21, SegmentSide22, LastSegment(AECRebarSingleBarSection)
let FirstSegmentLength, LSegmentSide11, LSegmentSide12, LSegmentSide21, LSegmentSide22, LastSegmentLength(Length)
set SegmentSide11 = BarElements[3]
set SegmentSide12 = BarElements[7]
set SegmentSide21 = BarElements[5]
set SegmentSide22 = BarElements[9]
set FirstSegment = BarElements[1]
set LastSegment = BarElements[BarElements.Size()]
FirstSegmentLength = FirstSegment.GetAttributeReal("BarLength")*1mm
LSegmentSide11 = SegmentSide11.GetAttributeReal("BarLength")*1mm
LSegmentSide12 = SegmentSide12.GetAttributeReal("BarLength")*1mm
LSegmentSide21 = SegmentSide21.GetAttributeReal("BarLength")*1mm
LSegmentSide22 = SegmentSide22.GetAttributeReal("BarLength")*1mm
LastSegmentLength = LastSegment.GetAttributeReal("BarLength")*1mm
if(abs(LSegmentSide11 - LSegmentSide12) < tol_for_length and abs(LSegmentSide21 - LSegmentSide22) < tol_for_length and
FirstSegmentLength < LSegmentSide11 and LastSegmentLength < LSegmentSide21 and
FirstSegmentLength < LSegmentSide21 and LastSegmentLength < LSegmentSide11 and
abs(FirstSegmentLength - LastSegmentLength) < tol_for_length)
{
CurrentSC = 51
}
}
else if((InternalAngle1 > 0 and InternalAngle2 > 0 and InternalAngle3 > 0 and InternalAngle1 > 90deg + tol_for_length and InternalAngle2 < 90deg - tol_for_angle and abs(InternalAngle3 - 90deg) < tol_for_angle) or
(InternalAngle1 > 0 and InternalAngle2 > 0 and InternalAngle3 > 0 and InternalAngle1 < 90deg - tol_for_length and InternalAngle2 > 90deg + tol_for_angle and abs(InternalAngle3 - 90deg) < tol_for_angle))
{
/*check lengths*/
let FirstSegment, SegmentSide1, SegmentSide2, LastSegment(AECRebarSingleBarSection)
let FirstSegmentLength, LSegmentSide1, LSegmentSide2, LastSegmentLength(Length)
set FirstSegment = BarElements[1]
set SegmentSide1 = BarElements[3]
set SegmentSide2 = BarElements[9]
set LastSegment = BarElements[BarElements.Size()]
FirstSegmentLength = FirstSegment.GetAttributeReal("BarLength")*1mm
LSegmentSide1 = SegmentSide1.GetAttributeReal("BarLength")*1mm
LSegmentSide2 = SegmentSide2.GetAttributeReal("BarLength")*1mm
LastSegmentLength = LastSegment.GetAttributeReal("BarLength")*1mm
if(FirstSegmentLength < LSegmentSide1 and LastSegmentLength < LSegmentSide1 and
FirstSegmentLength < LSegmentSide2 and LastSegmentLength < LSegmentSide2 and
abs(FirstSegmentLength - LastSegmentLength) < tol_for_length )
{
CurrentSC = 56
}
}
}
else if((abs(FirstBendAngle - (-90deg)) < tol_for_angle and abs(LastBendAngle -(-90deg)) < tol_for_angle ))
{
let InternalBend1, InternalBend2, InternalBend3(AECRebarSingleBarSection)
let InternalAngle1, InternalAngle2, InternalAngle3(Angle)
set InternalBend1=BarElements[4]
set InternalBend2=BarElements[6]
set InternalBend3=BarElements[8]
set InternalAngle1 = InternalBend1.GetAttributeReal("Angle")*1deg
set InternalAngle2 = InternalBend2.GetAttributeReal("Angle")*1deg
set InternalAngle3 = InternalBend3.GetAttributeReal("Angle")*1deg
if(abs(InternalAngle1 - (-90deg)) < tol_for_angle and abs(InternalAngle2 - (-90deg)) < tol_for_angle and abs(InternalAngle3 - (-90deg)) < tol_for_angle )
{
/*check lengths*/
let FirstSegment, SegmentSide11, SegmentSide12, SegmentSide21, SegmentSide22, LastSegment(AECRebarSingleBarSection)
let FirstSegmentLength, LSegmentSide11, LSegmentSide12, LSegmentSide21, LSegmentSide22, LastSegmentLength(Length)
set SegmentSide11 = BarElements[3]
set SegmentSide12 = BarElements[7]
set SegmentSide21 = BarElements[5]
set SegmentSide22 = BarElements[9]
set FirstSegment = BarElements[1]
set LastSegment = BarElements[BarElements.Size()]
FirstSegmentLength = FirstSegment.GetAttributeReal("BarLength")*1mm
LSegmentSide11 = SegmentSide11.GetAttributeReal("BarLength")*1mm
LSegmentSide12 = SegmentSide12.GetAttributeReal("BarLength")*1mm
LSegmentSide21 = SegmentSide21.GetAttributeReal("BarLength")*1mm
LSegmentSide22 = SegmentSide22.GetAttributeReal("BarLength")*1mm
LastSegmentLength = LastSegment.GetAttributeReal("BarLength")*1mm
if(abs(LSegmentSide11 - LSegmentSide12) < tol_for_length and abs(LSegmentSide21 - LSegmentSide22) < tol_for_length and
FirstSegmentLength < LSegmentSide11 and LastSegmentLength < LSegmentSide21 and
FirstSegmentLength < LSegmentSide21 and LastSegmentLength < LSegmentSide11 and
abs(FirstSegmentLength - LastSegmentLength) < tol_for_length)
{
CurrentSC = 51
}
}
else if((InternalAngle1 < 0 and InternalAngle2 < 0 and InternalAngle3 < 0 and InternalAngle1 < -90deg - tol_for_length and InternalAngle2 > -90deg + tol_for_angle and abs(InternalAngle3 - (-90deg)) < tol_for_angle) or
(InternalAngle1 < 0 and InternalAngle2 < 0 and InternalAngle3 < 0 and InternalAngle1 > -90deg + tol_for_length and InternalAngle2 < -90deg - tol_for_angle and abs(InternalAngle3 - (-90deg)) < tol_for_angle))
{
/*check lengths*/
let FirstSegment, SegmentSide1, SegmentSide2, LastSegment(AECRebarSingleBarSection)
let FirstSegmentLength, LSegmentSide1, LSegmentSide2, LastSegmentLength(Length)
set FirstSegment = BarElements[1]
set SegmentSide1 = BarElements[3]
set SegmentSide2 = BarElements[9]
set LastSegment = BarElements[BarElements.Size()]
FirstSegmentLength = FirstSegment.GetAttributeReal("BarLength")*1mm
LSegmentSide1 = SegmentSide1.GetAttributeReal("BarLength")*1mm
LSegmentSide2 = SegmentSide2.GetAttributeReal("BarLength")*1mm
LastSegmentLength = LastSegment.GetAttributeReal("BarLength")*1mm
if(FirstSegmentLength < LSegmentSide1 and LastSegmentLength < LSegmentSide1 and
FirstSegmentLength < LSegmentSide2 and LastSegmentLength < LSegmentSide2 and
abs(FirstSegmentLength - LastSegmentLength) < tol_for_length )
{
CurrentSC = 56
}
}
}
}
else if(nb_segments == 7 and nb_arcs == 6)
{
let iArc, NbRightRightAnglePos, NbRightRightAngleNeg(Integer)
NbRightRightAnglePos = 0
NbRightRightAngleNeg = 0
iArc=0
for iArc while iArc < nb_arcs
{
let Elem(AECRebarSingleBarSection)
let ElemAngle(Angle)
set Elem = BarElements[2*iArc+2]
set ElemAngle = Elem.GetAttributeReal("Angle")*1deg
if(abs(ElemAngle - 90deg) < tol_for_angle)
{
NbRightRightAnglePos = NbRightRightAnglePos + 1
}
if(abs(ElemAngle - (-90deg)) < tol_for_angle)
{
NbRightRightAngleNeg = NbRightRightAngleNeg + 1
}
iArc = iArc + 1
}
if(NbRightRightAnglePos == 6 or NbRightRightAngleNeg == 6)
{
/*check length*/
/*for now, impossible to check C == D*/
let CElem, DElem, AElem, BElem, AElem2, BElem2(AECRebarSingleBarSection)
let LCElem, LDElem, LAElem, LBElem, LA2Elem, LB2Elem(Length)
set CElem = BarElements[1]
set DElem = BarElements[BarElements.Size()]
set AElem = BarElements[3]
set BElem = BarElements[5]
set AElem2 = BarElements[7]
set BElem2 = BarElements[9]
LCElem = CElem.GetAttributeReal("BarLength") * 1mm
LDElem = DElem.GetAttributeReal("BarLength") * 1mm
LAElem = AElem.GetAttributeReal("BarLength") * 1mm
LBElem = BElem.GetAttributeReal("BarLength") * 1mm
LA2Elem = AElem2.GetAttributeReal("BarLength") * 1mm
LB2Elem = BElem2.GetAttributeReal("BarLength") * 1mm
if(LCElem < LAElem and LCElem < LBElem and LDElem < LAElem and LDElem < LBElem and abs(LAElem - LA2Elem)*1mm < tol_for_length and abs(LBElem - LB2Elem)*1mm < tol_for_length)
{
CurrentSC = 63
}
else
{
CurrentSC = 64
}
}
}
}
else
{
/*Check if frame*/
if(nb_arcs == 4 and nb_segments == 5)
{
let BarSegment1, BarSegment2, BarSegment3, BarSegment4, BarSegment5(AECRebarSingleBarSection)
let BarArc1, BarArc2, BarArc3, BarArc4(AECRebarSingleBarSection)
let LengthBarSegment1, LengthBarSegment2, LengthBarSegment3, LengthBarSegment4, LengthBarSegment5(Length)
let AngleBarArc1, AngleBarArc2, AngleBarArc3, AngleBarArc4(Angle)
set BarSegment1 = BarElements[1]
set BarArc1 = BarElements[2]
set BarSegment2 = BarElements[3]
set BarArc2 = BarElements[4]
set BarSegment3 = BarElements[5]
set BarArc3 = BarElements[6]
set BarSegment4 = BarElements[7]
set BarArc4 = BarElements[8]
set BarSegment5 = BarElements[9]
set AngleBarArc1 = BarArc1.GetAttributeReal("Angle")*1deg
set AngleBarArc2 = BarArc2.GetAttributeReal("Angle")*1deg
set AngleBarArc3 = BarArc3.GetAttributeReal("Angle")*1deg
set AngleBarArc4 = BarArc4.GetAttributeReal("Angle")*1deg
set LengthBarSegment1 = BarSegment1.GetAttributeReal("BarLength") * 1mm
set LengthBarSegment2 = BarSegment2.GetAttributeReal("BarLength") * 1mm
set LengthBarSegment3 = BarSegment3.GetAttributeReal("BarLength") * 1mm
set LengthBarSegment4 = BarSegment4.GetAttributeReal("BarLength") * 1mm
set LengthBarSegment5 = BarSegment5.GetAttributeReal("BarLength") * 1mm
/*check angles*/
if(abs(AngleBarArc1 - 90deg) < tol_for_angle and abs(AngleBarArc2 - 90deg) < tol_for_angle and abs(AngleBarArc3 - 90deg) < tol_for_angle and abs(AngleBarArc4 - 90deg) < tol_for_angle )
{
/*check length*/
if(abs(LengthBarSegment2 - LengthBarSegment4) < tol_for_length)
{
/*check orientation*/
let VecBarSegment1, VecBarSegment2, VecBarSegment3, VecBarSegment4, VecBarSegment5(Vector)
let Det1, Det2, Det3(Real)
VecBarSegment1 = [BarSegment1.GetAttributeReal("End_x") * 1mm - BarSegment1.GetAttributeReal("Start_x") * 1mm, BarSegment1.GetAttributeReal("End_y") * 1mm - BarSegment1.GetAttributeReal("Start_y") * 1mm, BarSegment1.GetAttributeReal("End_z") * 1mm - BarSegment1.GetAttributeReal("Start_z") * 1mm]
VecBarSegment2 = [BarSegment2.GetAttributeReal("End_x") * 1mm - BarSegment2.GetAttributeReal("Start_x") * 1mm, BarSegment2.GetAttributeReal("End_y") * 1mm - BarSegment2.GetAttributeReal("Start_y") * 1mm, BarSegment2.GetAttributeReal("End_z") * 1mm - BarSegment2.GetAttributeReal("Start_z") * 1mm]
VecBarSegment3 = [BarSegment3.GetAttributeReal("End_x") * 1mm - BarSegment3.GetAttributeReal("Start_x") * 1mm, BarSegment3.GetAttributeReal("End_y") * 1mm - BarSegment3.GetAttributeReal("Start_y") * 1mm, BarSegment3.GetAttributeReal("End_z") * 1mm - BarSegment3.GetAttributeReal("Start_z") * 1mm]
VecBarSegment4 = [BarSegment4.GetAttributeReal("End_x") * 1mm - BarSegment4.GetAttributeReal("Start_x") * 1mm, BarSegment4.GetAttributeReal("End_y") * 1mm - BarSegment4.GetAttributeReal("Start_y") * 1mm, BarSegment4.GetAttributeReal("End_z") * 1mm - BarSegment4.GetAttributeReal("Start_z") * 1mm]
VecBarSegment5 = [BarSegment5.GetAttributeReal("End_x") * 1mm - BarSegment5.GetAttributeReal("Start_x") * 1mm, BarSegment5.GetAttributeReal("End_y") * 1mm - BarSegment5.GetAttributeReal("Start_y") * 1mm, BarSegment5.GetAttributeReal("End_z") * 1mm - BarSegment5.GetAttributeReal("Start_z") * 1mm]
set VecBarSegment1 = VecBarSegment1 / VecBarSegment1.Norm()
set VecBarSegment2 = VecBarSegment2 / VecBarSegment2.Norm()
set VecBarSegment3 = VecBarSegment3 / VecBarSegment3.Norm()
set VecBarSegment4 = VecBarSegment4 / VecBarSegment4.Norm()
set VecBarSegment5 = VecBarSegment5 / VecBarSegment5.Norm()
set Det1 = ScalarProduct(CrossProduct(VecBarSegment1, VecBarSegment2), VecBarSegment3)
set Det2 = ScalarProduct(CrossProduct(VecBarSegment2, VecBarSegment3), VecBarSegment4)
set Det3 = ScalarProduct(CrossProduct(VecBarSegment3, VecBarSegment4), VecBarSegment5)
if(abs(Det1 - (-1)) < tol_for_length and abs(Det2) < tol_for_length and abs(Det3 - (-1)) < tol_for_length)
{
CurrentSC = 98
}
}
}
}
}
BendingShapeCodes.Append(CurrentSC)
i = i + 1
}
/* Write outputs */
Parameters.SetAttributeObject("AllBendingShapeCodes", BendingShapeCodes)
Railway Attainment Methods/* ========================================================================== */
/* RailwayAttainmentMethods.CATRule */
/* */
/* Sample file to customize Railway attainment methods. */
/* User can customize this file for each project. */
/* */
/* ========================================================================== */
/* Defines formulae for the various transition lengths */
/* for attaining Cant */
/* Based on the following variables */
/* {l} - spiral length from geometry */
/* {t} - transition length from table */
/* {m} - maximum cant value on Tangent */
/* {a} - applied cant for the curve */
/* {p} - fractional part of transition length achieved before curve point */
/* ========================================================================== */
/* Defines the following transition lengths (where approriate) */
/* LRtoFC - Level Rail to Full Cant */
/* LRtoBC - Level Rail to Beginning of Curve */
/* ========================================================================== */
/* Get inputs */Let l(real)Let t(real)Let m(real)Let a(real)Let p(real)l = Parameters.GetAttributeReal("sLength")t =
Parameters.GetAttributeReal("tLength")m = Parameters.GetAttributeReal("MaxCantOnTangent")a =
Parameters.GetAttributeReal("Cant")p = ThisObject.GetAttributeReal("TRate")
/* Compute outputs */Let LRtoFC(real)Let LRtoBC(real)if(l>0){ LRtoFC=l LRtoBC=l*p}else { LRtoFC=t if ( a>0 AND m>0)
{ Let threshold(real) threshold=m/a if(threshold<p ){ LRtoBC=t*threshold } else { LRtoBC=t*p } }
else { LRtoBC=t*p }}/* Write outputs */Parameters.SetAttributeReal("LRtoFC",
LRtoFC)Parameters.SetAttributeReal("LRtoBC", LRtoBC)
Railway Cant and Transition Length Rules/* ========================================================================== */
/* RailwayCantAndTransitionLengthRules_Sample.CATRule */
/* */
/* Sample file to calculat cant and transition length. */
/* User can customize this file for each project. */
/* */
/* ========================================================================== */
/* Defines formulas for Cant and transition length. */
/* Based on the following variables */
/* {Id} - formula identifier given by design rules */
/* -"France": "China" and "CantDeficiency" */
/* Cant(mm) = 6*Speed^2/radius */
/* tLength(m) = max(50,5.8*Speed*Speed*Speed/(180*radius)) */
/* -"China": */
/* Cant(mm) = 0.64*t*Speed*Speed/(3.6*3.6*g*radius) */
/* tLength(m) = 0.01*Cant*Speed */
/* -"CantDeficiency": */
/* Cant(mm) = ceil((eqCant-md)*2)/2 */
/* tLength(m) = 0.012*cantDeficiency*Speed */
/* {t} - track width (m) */
/* {s} - current design speed (m/s) */
/* {r} - Curve radius from geometry (m) */
/* {md} - maximum allowable cant deficiency (m) */
/* {me} - maximum allowable cant excess (m) */
/* {smax} - maximum speed (m/s) */
/* {smin} - minimum speed (m/s) */
/* {g} - gravity acceleration (m/s^2) */
/* ========================================================================== */
/* Defines cant and transition length values */
/* cant - Applied cant for the curve (m) */
/* tLength - Transition length (m) */
/* ========================================================================== */
/* Get inputs */
Let Id (String)
Let t (real)Let s (real)
Let r (real)Let md (real)
Let me (real)Let smax(real)
Let smin(real)
Id = Parameters.GetAttributeString("FormulaId")
t = Parameters.GetAttributeReal("TrackWidth")
s = Parameters.GetAttributeReal("Speed")
r = Parameters.GetAttributeReal("Radius")
md = Parameters.GetAttributeReal("MaxCantDeficiency")
me = Parameters.GetAttributeReal("MaxCantExcess")
smax = Parameters.GetAttributeReal("MaxSpeed")
smin = Parameters.GetAttributeReal("MinSpeed")
/* Compute outputs */
Let cant(real)
Let tLength(real)
/* Local attributs */
Let g (real) /*Gravity*/
Let eqCant(real) /*Equilibrium cant*/
g=9.806
/* Convert Speeds in km_h*/
Let Speed(real)
Let maxSpeed(Real)
Speed=s*3.6
maxSpeed =smax*3.6
if(Id=="France"){
cant=round(6*Speed*Speed/r)/1000
tLength=round(max(10,5.8*Speed*Speed*Speed/(180*r)))
}
else if (Id=="China")
{
cant=round(0.64*t*1000*Speed*Speed/(3.6*3.6*g*r))/1000
tLength=round(0.01*cant*1000*Speed)
}
else if(Id=="CantDeficiency")
{
eqCant=round(t*1000*maxSpeed*maxSpeed/(127*r))/1000
cant=ceil((eqCant-md)*2000)/2000
Let cantDeficiency(real)
cantDeficiency=round(t*1000*maxSpeed*maxSpeed/(127*r))/1000-cant
tLength=round(0.012*cantDeficiency*1000*Speed)
}
cant=max(cant,0.005)
tLength=max(tLength,5)
/* Write outputs */
Parameters.SetAttributeReal("Cant", cant)
Parameters.SetAttributeReal("tLength", tLength)
BIM Attribute CompletionYou can customize the behavior of BIM attributes by giving them a value through a Business Rule in Data Setup. To perform an automatic completion of missing IFC attributes in the BIM Attributes panel, you can use the BIM Completeness command that activates the BIM Attribute Completion Business Rule you have assigned to the Building & Civil Resources resource table. Several attributes can be defined/computed in BIM Attributes at the same time which saves time in design. The Business Rule script below is an example. If no XML resource file is set in Data Setup, the BIMAttributeCompletionRule_Sample.CATRule file delivered in
/* ========================================================================== */
/* BIMAttributeCompletionRule_Sample.CATRule */
/* */
/* Sample file to automatize the completion of IFC attribute */
/* */
/* ========================================================================== */
/* Based on the following variables */
/* {attributeName} */
/* ========================================================================== */
/* Defines attribute value */
/* {attributeValue} */
/* ========================================================================== */
/* Get inputs */
Let attributeName (String)
attributeName = Parameters.GetAttributeString("AttributeName")
/* Write outputs */
if(attributeName=="IfcPset_SlabCommon_Reference"){
(ThisObject:IfcPset_SlabCommon).IfcPset_SlabCommon_Reference="18.12.0456"
Parameters.SetAttributeString("AttributeValue", "18.12.0456")
}
if(attributeName=="IfcQto_SlabBaseQuantities_GrossVolume"){
Let partBodyList(List)
partBodyList = ThisObject ->Query("BodyFeature","x.Name like \"*PartBody*\"")
if(partBodyList.Size() > 0)
{
Let volume(VOLUME)
volume = smartVolume(partBodyList->GetItem(1))
Let skeletonList(List)
skeletonList = ThisObject ->Query("Feature","x.Name like \"*Skeleton Representation*\"")
if(skeletonList.Size() > 0)
{
Let skeleton(Feature)
skeleton = skeletonList->GetItem(1)
Let childrenListParam(List)
childrenListParam = skeleton->Query("AdvisorParameterSet","x.Name like \"Parameters*\"")
Let paramSet(AdvisorParameterSet)
paramSet = childrenListParam->GetItem(1)
paramSet->SetAttributeReal("IfcQto_SlabBaseQuantities_GrossVolume",volume)
Parameters.SetAttributeReal("AttributeValue", volume)
}else{
(ThisObject:IfcQto_SlabBaseQuantities).IfcQto_SlabBaseQuantities_GrossVolume=volume
Parameters.SetAttributeReal("AttributeValue", volume)
}
}
}
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||