mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 09:48:32 +00:00
Add description field
This commit is contained in:
@@ -94,11 +94,17 @@ def import_attribute(attribute, props, data, callback=None):
|
||||
new.doc.ifc_id = data["id"]
|
||||
new.doc.ifc_class = data["type"]
|
||||
new.doc.doc_url = get_ifc_class_doc_url(new.doc.ifc_class)
|
||||
new.doc.description = get_ifc_description(attribute.name())
|
||||
for line in get_ifc_class_usecase(new.doc.ifc_class):
|
||||
new_usecase_line = new.doc.use_case.add()
|
||||
new_usecase_line.name = line
|
||||
|
||||
|
||||
def get_ifc_description(property_name):
|
||||
# TODO : Implement fetching descriptipn from property name
|
||||
return "This describes what this fields means"
|
||||
|
||||
|
||||
def get_ifc_class_doc_url(class_name):
|
||||
# TODO : Implement fetching doc url
|
||||
return "https://github.com/IfcOpenShell/IfcOpenShell"
|
||||
|
||||
@@ -177,6 +177,7 @@ class AttributeDocumentation(PropertyGroup):
|
||||
ifc_id: IntProperty(name="ID")
|
||||
doc_url: StringProperty(name="URL")
|
||||
use_case: CollectionProperty(name="Use Case", type=StrProperty)
|
||||
description: StringProperty(name="Description")
|
||||
|
||||
def draw(self, layout):
|
||||
row = layout.row()
|
||||
|
||||
Reference in New Issue
Block a user