XbimWindowsUI icon indicating copy to clipboard operation
XbimWindowsUI copied to clipboard

Making DrawingControl3D dynamically

Open TasigurIshtar opened this issue 6 years ago • 2 comments

Hello guys, I made small project based on your XbimWindowsUI. Final purpose should be to allow enduser to load and show multiple IFC files. Three scenarios:

  1. I have DrawingControl3D dragged inside of wpf MainForm
  2. I created an UserControl, then I put DrawingControl3D inside od it. Next I draged my userControl into MainForm.
  3. Step two, but instead of draging userControl into MainForm I wanted to inject it during the runtime. Probably somehow like grid.Children.Add(myUserControl)

Compile -> run -> load model -> show model ...works fine in first two scenarios. In the third scenario after loading of model -> program is crushing on line: myUserControl.DrawingControl.Model = loadedModel;

Finaly I am not sure if this is because of the component or because of my lack of knowledge of wpf. Any advice would be helpful.

Thanks for your time.

TasigurIshtar avatar Jul 25 '19 08:07 TasigurIshtar

You'll have to provide some details on the exact error message you're seeing when you assign loadedModel

The best way to help get this looked would be so push some sample code out on Github so we can take a look at what you're doing.

andyward avatar Jul 25 '19 16:07 andyward

Hello, Thanks for your quick response.

I have attached small demo, where the problem is illustrated. https://github.com/TasigurIshtar/XBimTests p.s. It’s my first GitHub repo attempt, so please let me know if something is missing.

TasigurIshtar avatar Jul 29 '19 07:07 TasigurIshtar