sketchucation logo sketchucation
    • Login
    🤑 SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

    Web dialog import/export

    Scheduled Pinned Locked Moved Developers' Forum
    3 Posts 2 Posters 1.1k Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • chrisglasierC Offline
      chrisglasier
      last edited by

      Here is a summary of my posts under Index of Identity eaten by the server crash on 22nd November. I have also made it a new topic as it seems to me to be of universal potential over and above namesets.

      Thanks to Jim, Fredo6, Didier and others I have finally cobbled together some code that works ...

      
      def findIndex()
      a = 0
      entities = Sketchup.active_model.active_entities
      selection = Sketchup.active_model.selection
      entities.each do |entity|
      if entity.class == Sketchup;;Group || entity.class == Sketchup;;ComponentInstance	
      if selection[0] == entity
      cmd = "coreSUDown('#{a}');"
      p cmd
      @dlg.execute_script (cmd)
      end
      a+=1
      end
      end
      end
      

      This interactive set-up provides the opportunity not only to access and analyse any attributes extracted from Sketchup (don't know how to extract them yet) but also any other input by others with different interests in the component or group selected. (These other disciplines can use standalone namesets if visualisation is not required.) In my view this is far better than exporting to Excel, because it is direct and accessible to any authorised person with a browser, locally and world wide.

      Here is a video clip demonstrating what it does:

      [flash=425,355:37e9rq6m]http://www.youtube.com/v/P7zUH0C47MA[/flash:37e9rq6m]

      Working in the nameset UI the backup device can be used to highlight and manipulate components or groups in the Sketchup display, but interaction is not yet fully bilateral pending an attribute extraction solution.

      Incidently, I am now working on a nameset device to animate entities to accurately model the process of construction from delivery to installation; this really has only been made practical with this ruby.

      It would be good if there could be some kind of a switch that, when activated, can run this ruby directly on selection rather than from the context menu. Anyone know if this is possible?

      Thanks

      Chris

      With TBA interfaces we can analyse what is to be achieved so that IT can help with automation to achieve it.

      1 Reply Last reply Reply Quote 0
      • J Offline
        Jim
        last edited by

        Chris, you can set up a SelectionObserverif you (your code) wants to be notified of a selection change.

        Hi

        1 Reply Last reply Reply Quote 0
        • chrisglasierC Offline
          chrisglasier
          last edited by

          That sounds interesting. Do you know of any better reference material, the one you tagged is mainly just headings. Please let me know if you have a moment to spare.

          Chris

          With TBA interfaces we can analyse what is to be achieved so that IT can help with automation to achieve it.

          1 Reply Last reply Reply Quote 0
          • 1 / 1
          • First post
            Last post
          Buy SketchPlus
          Buy SUbD
          Buy WrapR
          Buy eBook
          Buy Modelur
          Buy Vertex Tools
          Buy SketchCuisine
          Buy FormFonts

          Advertisement