Editing IfcOpenShell code examples
From Wiki.OSArch
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 524: | Line 524: | ||
You can use <code>datetime.time</code> instead of <code>datetime.datetime</code> the same way. | You can use <code>datetime.time</code> instead of <code>datetime.datetime</code> the same way. | ||
==IfcDuration== | ==IfcDuration== | ||
− | [https://standards.buildingsmart.org/IFC/RELEASE/IFC4/ADD2_TC1/HTML/link/ifcduration.htm IfcDuration] is used to store a time interval (eg. time to perform a task) in ISO 8601 format. There is apparently no ready to use standard python module to handle it. It can be handled using regular expressions. | + | [https://standards.buildingsmart.org/IFC/RELEASE/IFC4/ADD2_TC1/HTML/link/ifcduration.htm IfcDuration] is used to store a time interval (eg. time to perform a task) in ISO 8601 format : PnYnMnDTnHnMnS. There is apparently no ready to use standard python module to handle it. It can be handled using regular expressions. |
<syntaxhighlight lang="python"> | <syntaxhighlight lang="python"> | ||
>>> import re | >>> import re | ||
Line 530: | Line 530: | ||
('2', '10', '15', '10', '30', '20') | ('2', '10', '15', '10', '30', '20') | ||
</syntaxhighlight> | </syntaxhighlight> | ||
− | |||
− | |||
− | |||
− | |||
− | |||
==IfcCalendarDate== | ==IfcCalendarDate== |