First time here? Check out the Help page!
1 | initial version |
That looks a bit suspect to me. The C++ purgeUnusedResourceObjects does not have that exception for constructions. I would think that the use count of 1 is possibly due to a StandardsInformationConstruction
or some object like that. I would do something like below to figure out what that object is and then decide if you want to remove the construction or not:
model.getConstructions.sort.each do |resource|
if resource.directUseCount == 0
unused_flag_counter += 1
resource.remove
elsif resource.directUseCount == 1
puts "WHAT IS THIS OBJECT?"
puts resource.sources[0]
unused_flag_counter += 1
resource.remove
end
end