mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-18 22:33:33 +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_id = data["id"]
|
||||||
new.doc.ifc_class = data["type"]
|
new.doc.ifc_class = data["type"]
|
||||||
new.doc.doc_url = get_ifc_class_doc_url(new.doc.ifc_class)
|
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):
|
for line in get_ifc_class_usecase(new.doc.ifc_class):
|
||||||
new_usecase_line = new.doc.use_case.add()
|
new_usecase_line = new.doc.use_case.add()
|
||||||
new_usecase_line.name = line
|
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):
|
def get_ifc_class_doc_url(class_name):
|
||||||
# TODO : Implement fetching doc url
|
# TODO : Implement fetching doc url
|
||||||
return "https://github.com/IfcOpenShell/IfcOpenShell"
|
return "https://github.com/IfcOpenShell/IfcOpenShell"
|
||||||
|
|||||||
@@ -177,6 +177,7 @@ class AttributeDocumentation(PropertyGroup):
|
|||||||
ifc_id: IntProperty(name="ID")
|
ifc_id: IntProperty(name="ID")
|
||||||
doc_url: StringProperty(name="URL")
|
doc_url: StringProperty(name="URL")
|
||||||
use_case: CollectionProperty(name="Use Case", type=StrProperty)
|
use_case: CollectionProperty(name="Use Case", type=StrProperty)
|
||||||
|
description: StringProperty(name="Description")
|
||||||
|
|
||||||
def draw(self, layout):
|
def draw(self, layout):
|
||||||
row = layout.row()
|
row = layout.row()
|
||||||
|
|||||||
Reference in New Issue
Block a user