Skip to content

A port's SystemType (its connector's system classification) and an electrical port's Flow=Source/Sink description are not written (RE-212 follow-up) #834

Open

Description

@DrunkOnJava

#828 (RE-197) types every port by its connector's domain and writes SOURCEANDSINK on every connector of a domain Revit's exporter gives no direction. Three inputs Revit's exporter also uses for a port are not read yet.

1. The connector's description. revit-ifc (ConnectorExporter.cs, read and cited) parses it as comma-separated key=value pairs (GetConnectorFullParameterFromDescription). For a pipe, a duct or a mechanical fitting it is the element's or its type's parameter PortDescription <n>, n the connector's number (one more than its index on a pipe or duct); for any other element it is the connector's own Description. SetDistributionPortAttributes then takes:

  • Flow: on an electrical connector, Source or Sink replaces SOURCEANDSINK. rvt-rs writes SOURCEANDSINK for such a port.
  • PortName: replaces the InPort_ / OutPort_ / Port_ name. rvt-rs names every port Port_<ElementId>_<index>.
  • SystemType: the port's SystemType where it is an IfcDistributionSystemEnum value.

The pairs also fill the port's property sets. No model Measure reads has such a description that we know of: every one of the 98 electrical ports in Revit's exports of the RE1 models and the BIM4LCA office is SOURCEANDSINK, and every port is named by its direction.

2. The connector's system classification. SystemType otherwise comes from the connector's DuctSystemType, ElectricalSystemType or PipeSystemType, mapped to IfcDistributionSystemEnum. On the office, Revit's export gives all 67 ports one (ELECTRICAL 43, HEATING 24); rvt-rs writes none.

3. An HVAC or piping connector's direction. RE-197 found it in no field of the family's ConnectorDataCell or the FamilyParams object its m_oRelevantParams points to; it is the connector element's own setting in the family's document, or, on a pipe or duct, the direction of its system's flow. Revit's export names those ports InPort_ and OutPort_ on RE1 (Mechanical 134, Plumbing 238), and the office's 12 pipes' 24 ends are SOURCEANDSINK; rvt-rs writes NOTDEFINED.

What would close this: read each input where Revit's exporter reads it, each measured against an export that shows it. For the description that needs a model whose families set one, as none of the current oracles does.

Activity

  1. added
    area:ifc
    priority:P3
    type:research
    on Oct 19, 2026
  2. DrunkOnJava commented on Oct 20, 2026

    @DrunkOnJava
    OwnerAuthor

    A measured negative for a pipe port's flow direction (research branch re/847-port-places, Measure run 39372419964). The three i32s after each connector entry's point (RE-131's layout) are 3, then one of 0 to 3 (or 6, 7, 11 on Mechanical), then -1, 1 or 2. They do not tell Revit's In ports from its Out ports or its ports with no flow direction. On RE1 Plumbing, 3 0 -1 belongs to 9 In, 15 Out and 1 unnamed self entry, and 14 In, 18 Out and 4 unnamed joined entries. Every other pattern is just as mixed. So a pipe's flow direction is not in its connector entries' first words after the point. Since #865, a pipe port's Z axis comes from the rule Revit's export follows: into the pipe for In (66 of 66 on RE1), out of it otherwise. A read flow direction would make Revit's 57 In ports on RE1 Plumbing point the right way.

  3. 34 remaining items

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:ifcpriority:P3type:research

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions