AttributeServiceΒΆ
The AttributeService gives access to existing attributes and allows to create new user attributes.
A new user attribute can be created as follows:
#--------------------- create an attribute with an input field list_values = AllplanUtil.VecStringList() AllplanBaseElements.AttributeService.AddUserAttribute(doc, AllplanBaseElements.AttributeService.AttributeType.Double, "FixtureHeight", "2.5", 1.0, 5.0, "m", AllplanBaseElements.AttributeService.AttributeControlType.Edit, list_values) #--------------------- create an attribute with a combobox list_values[:] = ["1.0", "1.1", "1.2", "1.3", "1.4", "1.5"] AllplanBaseElements.AttributeService.AddUserAttribute(doc, AllplanBaseElements.AttributeService.AttributeType.Double, "FixtureRadius", "1.2", 1.0, 1.5, "m", AllplanBaseElements.AttributeService.AttributeControlType.ComboBox, list_values)
The complete documentation of the members from the AttributeService class can be found here: