hello,
i don't understand why the material doesnt applied,
here is my code:
Dim state As Autodesk.Navisworks.Api.Interop.ComApi.InwOpState10 state = Autodesk.Navisworks.Api.ComApi.ComApiBridge.State Dim PresenterPlugin As Autodesk.Navisworks.Api.Interop.ComApi.InwOwPresenterElement = Nothing Dim plugin For Each plugin In state.Plugins If plugin.ObjectName = "nwOwPresenterElement" Then PresenterPlugin = plugin MsgBox(PresenterPlugin.ToString, MsgBoxStyle.OkOnly," Presenter Plugin OK") Exit For Else MsgBox(" Presenter Plugin non détecté") End If Next PresenterPlugin.UserMaterials.AddFromArchive("Aluminium poli") If state.CurrentSelection.Paths().Count > 0 Then For Each path As InwOaPath In state.CurrentSelection.Paths() PresenterPlugin.MaterialMappings().AddMapping("Aluminium poli", path, True) Next Else MsgBox("la selection est vide") End If
the presenter plugin is detected and the material is added to the UserMaterial list
but the material is not applied to the currentSelection
and there is no Error Msg.
do i miss something?
thanks for help
vanessa
Hi,
My questions:
- is this a Control based application, or a plugin?
- does this issue happen with any model or specific model?
- does hit issue occur with any material or specific one?
hi, thanks for your help
so, this is a Plugin,
and this morning i have tried differents materials and differents models, it still doesn't apply
i understand plugin Presenter works only with Com APi, but i suppose i can work with it if i use APIBridge in .NET?
i really don't understand where is the problem !
Hi,
sorry I was not able to get back soon.
The blog below is what I wrote on presenter. It can still work. Note: from Navisworks 2015, Presenter and the relevan API are removed.
http://adndevblog.typepad.com/aec/2013/12/working-with-presenter-by-api.html
Could you check the blog if it helps you to figure out your problem?
Hi,
Unfortuately this Question is still unanswered.
I'm trying to change some materials and got stuck.
Can you please provide the demo code for me?
I am working with .Net Studio with the ComApiBridge and Navisworks 2014
Thanks!
Andreas