mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-13 19:07:57 +00:00
Python wrapper: enable iteration over all entities, get attribute optionality information
This commit is contained in:
@@ -95,6 +95,10 @@ Argument* IfcParse::IfcLateBoundEntity::getArgument(unsigned int i) const {
|
||||
const char* IfcParse::IfcLateBoundEntity::getArgumentName(unsigned int i) const {
|
||||
return IfcSchema::Type::GetAttributeName(_type,i).c_str();
|
||||
}
|
||||
bool IfcParse::IfcLateBoundEntity::getArgumentOptionality(unsigned int i) const {
|
||||
return IfcSchema::Type::GetAttributeOptional(_type, i);
|
||||
}
|
||||
|
||||
void IfcParse::IfcLateBoundEntity::invalid_argument(unsigned int i, const std::string& t) {
|
||||
const std::string arg_name = IfcSchema::Type::GetAttributeName(_type,i);
|
||||
throw IfcException(t + " is not a valid type for '" + arg_name + "'");
|
||||
|
||||
Reference in New Issue
Block a user