sketchucation logo sketchucation
    • Login
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

    SU view inside WebDialog

    Scheduled Pinned Locked Moved Developers' Forum
    5 Posts 3 Posters 407 Views 3 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.
    • F Offline
      fpmalard
      last edited by

      Hello,

      I was wondering if it is possible to create a WebDialog and display inside it a SU View control to draw entities on the fly inside this view control.

      Do SU provide an Active-X control or something like that to be used inside a dialog?

      Regards,
      Fernando.

      1 Reply Last reply Reply Quote 0
      • C Offline
        CPhillips
        last edited by

        @fpmalard said:

        Hello,

        I was wondering if it is possible to create a WebDialog and display inside it a SU View control to draw entities on the fly inside this view control.

        Do SU provide an Active-X control or something like that to be used inside a dialog?

        Regards,
        Fernando.

        I have done it. But there are issues. Its Win32 only and works by reassigning the 3d window to the WebDialog. One problem is the display can only be in one place at a time. So if you rotate the view in the Webdialog it doesnt update the main view until you switch the display back to that window. And the Webdialog display goes away as soon as you restore the view. It can also crash if you do anything wrong like close the Webdialog before restoring the window.

        If you are still interested I can try to dig up the code. It was only one or two small functions if I remember right.

        Chris

        1 Reply Last reply Reply Quote 0
        • F Offline
          fpmalard
          last edited by

          Hi Chris,

          Sure, if you can tell me that would be great!!!
          Thank you.

          1 Reply Last reply Reply Quote 0
          • AdamBA Offline
            AdamB
            last edited by

            Sounds a bit hacky..

            I'd just have a little extension that adds a SketchUp::View and then write a tiny webserver that serves the image up to the WebDialog on a known port. ie in your html, you'd have an iframe with a href of localhost:8080 or whatever.

            I've done this a few times in different scenarios and it works a treat - its a few kbytes of code.

            Adam

            Developer of LightUp Click for website

            1 Reply Last reply Reply Quote 0
            • F Offline
              fpmalard
              last edited by

              Hello,

              Actually I was wondering if I can preview an entiy drawing inside the webdialog before create it into current model. This will be used on entities created from parameters like width, length, etc.

              As soon as the user change some of these parameters I could show a preview drawing and only after he hits Ok it creates the entity inside current model.

              Any ideas?
              Regards,
              Fernando

              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