![](/assets/uploads/profile/uid-184060/184060-profileavatar-1715172219238.jpeg)
Best posts made by alexpacio2013
Latest posts made by alexpacio2013
-
RE: Request Section Management Panel
@Rich-O-Brien I know many other solutions but They are tricks to get around the problem but the problem remains it is not possible to manage sections scenes in a simple way. It would need a panel to manage the sections anyway thanks for the suggestion.
-
RE: Request Section Management Panel
@Rich-O-Brien I'll start by saying that I'm not a programmer. I created this script with cloud 3 5 AI to disable or activate the sections in the project. The plug-in correctly creates the list of sections but even though I created the activate and deactivate buttons, they don't work. I tried it on sketchup 2024. Is there anyone who can give me that suggestion?
require 'sketchup.rb' module SectionManager def self.show_dialog dialog = UI::WebDialog.new("Gestione Sezioni", false, "SectionManager", 400, 500, 100, 100, true) dialog.set_size(400, 500) dialog.add_action_callback("toggleSection") do |_, section_id| model = Sketchup.active_model section = find_section_by_id(model, section_id.to_i) if section model.start_operation('Toggle Section', true) section.active = !section.active model.commit_operation puts "Sezione #{section_id} #{section.active? ? 'attivata' : 'disattivata'}" else puts "Sezione #{section_id} non trovata" end update_dialog_content(dialog) end dialog.add_action_callback("activateSection") do |_, section_id| model = Sketchup.active_model section = find_section_by_id(model, section_id.to_i) if section model.start_operation('Activate Section', true) section.active = true model.commit_operation puts "Sezione #{section_id} attivata" else puts "Sezione #{section_id} non trovata" end update_dialog_content(dialog) end dialog.add_action_callback("refreshList") do |_| puts "Aggiornamento lista richiesto" update_dialog_content(dialog) end update_dialog_content(dialog) dialog.show end def self.find_all_sections(entities) sections = [] entities.each do |entity| if entity.is_a?(Sketchup::SectionPlane) sections << entity elsif entity.is_a?(Sketchup::Group) || entity.is_a?(Sketchup::ComponentInstance) sections += find_all_sections(entity.definition.entities) end end sections end def self.find_section_by_id(model, section_id) find_all_sections(model.active_entities).find { |s| s.entityID == section_id } end def self.update_dialog_content(dialog) model = Sketchup.active_model sections = find_all_sections(model.active_entities) puts "Numero totale di sezioni trovate (incluse quelle nidificate): #{sections.length}" html = <<-HTML <html> <head> <style> body { font-family: Arial, sans-serif; } .section { margin: 10px 0; } button { margin-left: 5px; } </style> </head> <body> <h2>Tutte le Sezioni</h2> <div id="sectionList"> #{ if sections.empty? "<p>Nessuna sezione trovata nel modello.</p>" else sections.map { |section| "<div class='section'> #{section.name || 'Sezione senza nome'} (ID: #{section.entityID}) <button onclick='toggleSection(#{section.entityID})'> #{section.active? ? 'Disattiva' : 'Attiva'} </button> <button onclick='activateSection(#{section.entityID})'> Attiva </button> </div>" }.join end } </div> <button onclick='refreshList()'>Aggiorna Lista</button> <script> function toggleSection(sectionId) { window.location = 'skp:toggleSection@' + sectionId; } function activateSection(sectionId) { window.location = 'skp:activateSection@' + sectionId; } function refreshList() { window.location = 'skp:refreshList@'; } </script> </body> </html> HTML dialog.set_html(html) end end # Aggiungi una voce di menu per avviare lo script UI.menu("Plugins").add_item("Gestione Sezioni (Versione Aggiornata)") { SectionManager.show_dialog }
puts "Script di gestione sezioni (versione aggiornata) caricato"
-
RE: Request Section Management Panel
@Rich-O-Brien I consider this function a basic function of the program I do not have an option to have those who develop plugins in Ruby create. A panel to manage sessions is essential as it is to manage levels to manage scenes to manage materials to manage components in practice it is a function in my opinion fundamental However if there is someone who wants to develop a plugin of this kind I am available to give my suggestions to implement the necessary functions
-
Request Section Management Panel
Hi, I’m asking you why Sketchup has never created a panel for managing sections, like tags, to be able to activate, deactivate, rename, delete them and if possible match them to scenes. I think this function is essential because I often find myself with many sections inside objects and components and managing them becomes complicated. There is the possibility of acting also with the structure panel but it is difficult to disentangle oneself within the subgroups. I think this is a fundamental function for sketchup and I don’t understand why no one has ever thought of it. Often to manage the activation of the sections I go through the vray panel. When a function like this
Who is available to develop a Plugin that solves this problem?
-
RE: SCFLicense: Extension Licensing on Sketchucation
Hi cold today I have this problem with the ThruPaint license. I tried to reinstall the license but it gives me an error that it has expired and in my panel I can't find the TruPaint license. It seemed to me I seemed to have a validated Unlimited license. What should I do, thank you
-
RE: Curviloft and sketchup 2024 problem
@fredo6 said in Curviloft and sketchup 2024 problem:
The problem should be fixed with the new version LibFredo6 v14.4c, just published.
Many thanks for signaling the bug and providing the model.
Perfect, thanks for the quick resolution of the problem
-
RE: Sketchup 2024 crashes on startup.
@TIG
Seems to have solved it thanks to your suggestion of sketchup restore. If the problem returns I'll let you know, thanks