mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-14 19:34:34 +00:00
Accept list of entity instances from Python
This commit is contained in:
@@ -65,7 +65,7 @@ void Ifc::IfcUntypedEntity::setArgument(unsigned int i) {
|
||||
bool is_optional = Ifc2x3::Type::GetAttributeOptional(_type, i);
|
||||
if (is_optional) {
|
||||
writable_entity()->setArgument(i);
|
||||
} else invalid_argument(i,"NONE");
|
||||
} else invalid_argument(i,"NULL");
|
||||
}
|
||||
void Ifc::IfcUntypedEntity::setArgument(unsigned int i, int v) {
|
||||
IfcUtil::ArgumentType arg_type = Ifc2x3::Type::GetAttributeType(_type,i);
|
||||
|
||||
@@ -190,7 +190,11 @@ std::string IfcWriteEntityListArgument::toString(bool upper) const {
|
||||
if ( Ifc2x3::Type::IsSimple(e->type()) ) {
|
||||
ss << e->toString(upper);
|
||||
} else {
|
||||
ss << "#" << e->id();
|
||||
if (e->file) {
|
||||
ss << "#" << e->id();
|
||||
} else {
|
||||
ss << "#?";
|
||||
}
|
||||
}
|
||||
}
|
||||
ss << ")";
|
||||
@@ -323,7 +327,11 @@ std::string IfcWriteIntegralArgument::toString(bool upper) const {
|
||||
if ( Ifc2x3::Type::IsSimple(e->type()) ) {
|
||||
ss << e->toString(upper);
|
||||
} else {
|
||||
ss << "#" << e->id();
|
||||
if (e->file) {
|
||||
ss << "#" << e->id();
|
||||
} else {
|
||||
ss << "#?";
|
||||
}
|
||||
}}
|
||||
break;
|
||||
default: throw IfcParse::IfcException("Invalid cast");
|
||||
|
||||
Reference in New Issue
Block a user