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

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 8 Aug 2008, 20:00

    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 8 Aug 2008, 23:17

      @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 9 Aug 2008, 12:37

        Hi Chris,

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

        1 Reply Last reply Reply Quote 0
        • A Offline
          AdamB
          last edited by 9 Aug 2008, 13:16

          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 9 Aug 2008, 19:19

            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
            1 / 1
            • First post
              5/5
              Last post
            Buy SketchPlus
            Buy SUbD
            Buy WrapR
            Buy eBook
            Buy Modelur
            Buy Vertex Tools
            Buy SketchCuisine
            Buy FormFonts

            Advertisement