SU view inside WebDialog
-
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. -
@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
-
Hi Chris,
Sure, if you can tell me that would be great!!!
Thank you. -
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
-
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
Advertisement