Menu

Get all the inverse attributes' names

Help
lorinma
2015-12-02
2015-12-02
  • lorinma

    lorinma - 2015-12-02

    Hi Thomas,

    I'm using ifcopenshell-python, I can get the inverse attribute's value by
    giving the attribute's name, but is it possible to get all the inverse
    attributes' name of an entity?

    e.g., given a IfcShapeRepresentation entity, list the
    names: [RepresentationMap,LayerAssignments,OfProductRepresentation]

    Thanks!

     
  • Thomas Krijnen

    Thomas Krijnen - 2015-12-02

    Hi,

    In principal yes, but with all the development effort in this area lately it is not very stable. Are you using binaries from the website or you compiled your own?

    Your best bet is probably to try the following:

    >>> import ifcopenshell
    >>> f = ifcopenshell.open()
    >>> w = f.createIfcWallStandardCase()
    >>> w.wrapped_data.get_inverse_attribute_names()
    (u'ConnectedFrom', u'ConnectedTo', u'ContainedInStructure', u'Decomposes', u'Fil
    lsVoids', u'HasAssignments', u'HasAssociations', u'HasCoverings', u'HasOpenings'
    , u'HasPorts', u'HasProjections', u'HasStructuralMember', u'IsConnectionRealizat
    ion', u'IsDecomposedBy', u'IsDefinedBy', u'ProvidesBoundaries', u'ReferencedBy',
     u'ReferencedInStructures')
    

    Hope that helps,

    Kind regards,
    Thomas

     
    • lorinma

      lorinma - 2015-12-02

      Hi Thomas,
      Thanks for your reply.
      I'm using IfcOpenShell-python for python 3.4 64bit Linux from the website.
      It seems there's no get_inverse_attribute_names()
      Should I compile the current master version on github?
      Thanks!

      Ling

       

      Last edit: lorinma 2015-12-02

Log in to post a comment.

MongoDB Logo MongoDB