Moved here from http://www.dynoinsight.com/phpBB3/viewt ... f=3&t=2871
By atrev:
One of the errors that can be produced easily, which maybe by design, but an oversight, is that when you create a VB.NET project targeting .NET Framework 4, even though the application compiles and loads, right clicking the control and clicking to open the Model Viewer, and the applications immediately crashes with one of these uncaught exceptions
Problem with .NET 4
Re: Problem with .NET 4
Hi atrev
There is no Model Viewer in the context menu. There are the Full Screen option, which seems to be working, and the Model Explorer.
Model Explorer is implemented as .NET2.0 plugin. Assuming that you are using 32 bit KC, you need to recompile it for .NET4. See more in the end of http://www.dynoinsight.com/Help/Component/Explorer.aspx
.NET 4 is not supported in 64 bit installations yet. We are working hard to make a quick release of KC 4.4 to add that. A beta should be available in a week or so.
If it is not urgent I recommend waiting with .NET 4 until KC4.4 is released.
Regards
Nick
There is no Model Viewer in the context menu. There are the Full Screen option, which seems to be working, and the Model Explorer.
Model Explorer is implemented as .NET2.0 plugin. Assuming that you are using 32 bit KC, you need to recompile it for .NET4. See more in the end of http://www.dynoinsight.com/Help/Component/Explorer.aspx
.NET 4 is not supported in 64 bit installations yet. We are working hard to make a quick release of KC 4.4 to add that. A beta should be available in a week or so.
If it is not urgent I recommend waiting with .NET 4 until KC4.4 is released.
Regards
Nick
Re: Problem with .NET 4
Model Explorer I meant ye. Didn't realise the source code was available.
Looking through its code it has an OnEvent function exposed which updates the page. This function as far as I can tell isn't used internally to the explorer project.
Is this a function I just have to call manually to update the page? Or is there a way to tie it to an control event or method, such as maybe updating the model explorer when you call updateview on the control?
I noticed in the documentation a mention about eEditEventModelStructureChanged and eEditEventItemStructureChanged changed events, but when I try to enable these options I cant get the required object, and it throws an exception about types
Thanks
Looking through its code it has an OnEvent function exposed which updates the page. This function as far as I can tell isn't used internally to the explorer project.
Is this a function I just have to call manually to update the page? Or is there a way to tie it to an control event or method, such as maybe updating the model explorer when you call updateview on the control?
I noticed in the documentation a mention about eEditEventModelStructureChanged and eEditEventItemStructureChanged changed events, but when I try to enable these options I cant get the required object, and it throws an exception about types
Thanks
Re: Updating Explorer
UpdatePageEx() updates the tree and the controls on the page. You call it from inside the explorer of course
OnEvent() method is called by the KC component when structure of the model has changed (objects added or deleted or child/parent structure changed). This is the only event which causes explorer to update.
There are notifications to the application about selection changes in explorer, but this works the other way. So far we did not need to pass any information from application to the explorer. We will keep this in mind but I am not sure when we will get to it
As a hack you can add an empty or invisible dummy object to the model which will work as a messenger. Adding it or changing its position in the array of objects will cause a notification. You can handle the notification by adding your code to the explorer. You can distinguish the messenger by a special name. The message can be passed via user data http://www.dynoinsight.com/Help/Models/ ... rview.aspx of the messenger object. IModel2.AddNewItem(EObjectType.eObjTypeMeshSection); will add an empty hence invisible object, for example
The eEditEventModelStructureChanged and eEditEventItemStructureChanged items are not relevant here. They are related to overlays. http://www.dynoinsight.com/Help/Geom/View/Overlay.aspx You need to create an overlay before using them. The topic related to this seems to be missing in the web version of docs. We will sort it out
Nick
OnEvent() method is called by the KC component when structure of the model has changed (objects added or deleted or child/parent structure changed). This is the only event which causes explorer to update.
There are notifications to the application about selection changes in explorer, but this works the other way. So far we did not need to pass any information from application to the explorer. We will keep this in mind but I am not sure when we will get to it
As a hack you can add an empty or invisible dummy object to the model which will work as a messenger. Adding it or changing its position in the array of objects will cause a notification. You can handle the notification by adding your code to the explorer. You can distinguish the messenger by a special name. The message can be passed via user data http://www.dynoinsight.com/Help/Models/ ... rview.aspx of the messenger object. IModel2.AddNewItem(EObjectType.eObjTypeMeshSection); will add an empty hence invisible object, for example
The eEditEventModelStructureChanged and eEditEventItemStructureChanged items are not relevant here. They are related to overlays. http://www.dynoinsight.com/Help/Geom/View/Overlay.aspx You need to create an overlay before using them. The topic related to this seems to be missing in the web version of docs. We will sort it out
Nick