From 16246d9e5fce5ff86c2dd81b9008d387b60a3c0f Mon Sep 17 00:00:00 2001 From: Georg Grebenyuk <55656376+GeorgGrebenyuk@users.noreply.github.com> Date: Mon, 2 May 2022 18:04:34 +0300 Subject: [PATCH] Add new output data --- src/renga_debug/renga_debug.cpp | 34 +++++++++++++++++++++++---------- 1 file changed, 24 insertions(+), 10 deletions(-) diff --git a/src/renga_debug/renga_debug.cpp b/src/renga_debug/renga_debug.cpp index b280e94..22ba57f 100644 --- a/src/renga_debug/renga_debug.cpp +++ b/src/renga_debug/renga_debug.cpp @@ -4,6 +4,9 @@ #include #include "renga_core.h" #include +#include +#include +namespace fs = std::filesystem; int main() { @@ -11,22 +14,33 @@ int main() //TestHouse_Offset problem with getting props in IBuildingInfoPtr std::string path_to_files_in_dir; std::cout << "Press path to folder with Renga projects (rnp):" << std::endl; - std::cout << "Введите путь до папки с файлами проектов (rnp):" << std::endl; + std::cout << "Введите путь до папки с файлами проектов (rnp):\n" << std::endl; std::cin >> path_to_files_in_dir; + std::cout << std::endl; int conv_type; std::cout << "Press type of project conversion (0: Navisworks)" << std::endl; - std::cout << "Укажите тип для преобразования проекта (0: Navisworks)" << std::endl; + std::cout << "Укажите тип для преобразования проекта (0: Navisworks)\n" << std::endl; std::cin >> conv_type; + std::cout << std::endl; + + for (const auto& entry : fs::directory_iterator(path_to_files_in_dir)) + { + fs::path one_path = entry.path(); + if (one_path.has_extension() && one_path.extension() == ".rnp") + { + std::cout << "Start for file " << one_path << std::endl; + _bstr_t str_path(one_path.c_str()); + const char* new_path = str_path; + default_start(new_path, 0); + std::cout << "End!\n"; + } + } + + + //std::string current_path = "E:\\VC_Projects\\BDC_2022\\20_Models\\Renga\\EKB-3-Гараж-АР.rnp"; //"ttage.rnp" E:\\Temp\\BridgeEx.rnp" + // - - std::string current_path = "E:\\VC_Projects\\BDC_2022\\20_Models\\Renga\\EKB-3-Гараж-АР.rnp"; //"ttage.rnp" E:\\Temp\\BridgeEx.rnp" - - const char* new_path = current_path.c_str(); - - default_start(new_path, 0); - - std::cout << "End!\n"; return 0; }