OSArch Community

IFC project (modifying project name)

  1. L

    Hi,

    I am new here and I am trying to figure out how to change the project name of my my IFC file with code.

    my ifc project is like this:

    IFCPROJECT('3ZP7Iz_zX5EAHhd83K6qGX',#42,'0001',$,$,'Project Name','Project Status',(#114),#109);

    I want to change Project Name by a new one

    I was trying to do something like this

    project.remove("Project Name")

    Traceback (most recent call last):

    File "<blender_console>", line 1, in <module>

    ValueError: list.remove(x): x not in list

    I am not sure how to do this.

  2. A

    you could try this

    project.Name = "New Name"

  3. L

    I tried it but it gave an error

    project.Name = "New Name"

    Traceback (most recent call last):

    File "<blender_console>", line 1, in <module>

    AttributeError: 'list' object has no attribute 'Name'

  4. L

    Hi,

    It was missing just to specify the project by guid

    and it worked.

    Thanks!

  5. M

    You likely have a list object because you are doing ifc_file.by_type("IfcProject"), which returns a list (since potentially there could be more than one element found). So you could do ifc_file.by_type("IfcProject")[0] to ensure you get the first (and only) project in the model.

Login or Register to reply.