diff --git a/src/ifcparse/IfcParse.cpp b/src/ifcparse/IfcParse.cpp index 2b6c978bde..8734298233 100644 --- a/src/ifcparse/IfcParse.cpp +++ b/src/ifcparse/IfcParse.cpp @@ -891,7 +891,9 @@ std::ostream& operator<< (std::ostream& os, const IfcParse::IfcFile& f) { for ( MapEntityById::const_iterator it = f.begin(); it != f.end(); ++ it ) { const IfcEntity e = it->second; - os << e->entity->toString(true) << ";" << std::endl; + if (!IfcSchema::Type::IsSimple(e->type())) { + os << e->entity->toString(true) << ";" << std::endl; + } } os << "ENDSEC;" << std::endl; diff --git a/src/ifcparse/IfcWrite.cpp b/src/ifcparse/IfcWrite.cpp index e10fc8563b..c1d1cca6b3 100644 --- a/src/ifcparse/IfcWrite.cpp +++ b/src/ifcparse/IfcWrite.cpp @@ -84,8 +84,10 @@ std::string IfcWritableEntity::toString(bool upper) { if ( upper ) { for (std::string::iterator p = dt.begin(); p != dt.end(); ++p ) *p = toupper(*p); } - if ( _id ) ss << "#" << *_id; - ss << "=" << dt << "("; + if ( _id && !IfcSchema::Type::IsSimple(_type) ) { + ss << "#" << *_id << "="; + } + ss << dt << "("; for ( std::map::const_iterator it = args.begin(); it != args.end(); ++ it ) { if ( it != args.begin() ) ss << ","; const ArgumentPtr a = it->second;