IFC project (modifying project name)

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 "", line 1, in
ValueError: list.remove(x): x not in list

I am not sure how to do this.

Comments

  • you could try this
    project.Name = "New Name"

  • I tried it but it gave an error

    project.Name = "New Name"

    Traceback (most recent call last):
    File "", line 1, in
    AttributeError: 'list' object has no attribute 'Name'

  • Hi,
    It was missing just to specify the project by guid
    and it worked.
    Thanks!

    Coen
  • 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.

Sign In or Register to comment.