AIM not works with Dockable Pane
Opened this issue · 2 comments
Describe the bug
I'm using a Dockable pane but I can't access my dockablePane from AIM...
On startup I register a new Dockable with Guid
like this :
//register in application with a new guid
UIApplication uiapp = new UIApplication(sender as Application);
_uiApplication = uiapp;
// *** Code pour enregistrer ta nouvelle PanoDockablePane ***
PanoDockablePane panoPane = new PanoDockablePane();
_panoPane = panoPane; // Sauvegarder l'instance
DockablePaneId panoDockablePaneId = new DockablePaneId(new Guid("{3C19FAAC-140C-4B24-A1B3-782EB5E242C4}"));
uiapp.RegisterDockablePane(panoDockablePaneId, "PanoDockablePane", _panoPane as IDockablePaneProvider);
As you can see, I also do
PanoDockablePane panoPane = new PanoDockablePane(); _panoPane = panoPane; // Sauvegarder l'instance
in order to call public method I made in my public partial class PanoDockablePane : System.Windows.Controls.UserControl, IDockablePaneProvider like SetupCamera or LoadPanoramaTexture
Then, in my public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements)
I've got this :
` // GUID de la DockablePane
DockablePaneId dockablePaneId = new DockablePaneId(new Guid("{3C19FAAC-140C-4B24-A1B3-782EB5E242C4}"));
// Récupérer la DockablePane
DockablePane dockablePane = _uiapp.GetDockablePane(dockablePaneId);
// Afficher la DockablePane si elle est trouvée
if (dockablePane != null)
{
dockablePane.Show();
}
else
{
MessageBox.Show("Erreur : Impossible de trouver la DockablePane avec cet ID", "Erreur critique", MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}
#if DEBUG
//Do nothing
#else
PanoDockablePane panoPane = SettingUpRibbon.GetPanoDockablePane();
#endif
panoPane.Fov = fov;
panoPane.SetupCamera();
panoPane.LoadPanoramaTexture(str_url, scanNamme);`
In Release Mode (using by AddInManager), if I do
PanoDockablePane panoPane = SettingUpRibbon.GetPanoDockablePane();
I can do panoPane.SetupCamera(); and it works
BUT, in debug mode I've got an error in this line :
PanoDockablePane panoPane = SettingUpRibbon.GetPanoDockablePane();
Wich is normal because AIM can't access to SettingUpRibbon!
But, in Debug mode, nothing happens with those lines:
panoPane.Fov = fov; panoPane.SetupCamera(); panoPane.LoadPanoramaTexture(str_url, scanNamme);
Do you know why?
Hi @SonaBIMDev, sorry for my reply late with busy work, dow you have any demo to do investigate? it really hard to debug and see similar issue from my side.
Hello,
I am one of SonaBim's collaborators, and I apologize for the delay in responding to this ticket. We took additional time to investigate the issue thoroughly and prepare a detailed test project that reproduces the problem. Along with this, I have included comparative screenshots to demonstrate the issue.
Bug Description
We are encountering an issue with AddIn Manager where changes to the Dockable Pane (either its appearance or the underlying code) are not reflected when compiled and run. Specifically:
Appearance Changes:
Modifications to the visual elements of the Dockable Pane, such as layout updates or UI adjustments, are not updated after recompilation.
Code Changes:
Updates to the logic inside the Dockable Pane (e.g., adding new methods, modifying properties, or inserting Debug.Write statements) are not applied. Even after recompiling, the changes do not take effect.
GitHub Repository for Testing
To assist in resolving the issue, we have created a GitHub repository with the full test project, including:
A minimal working example of the Dockable Pane setup.
Code that reproduces the issues with AddIn Manager.
Detailed comments to explain the logic and expected behavior.
Repository Link: https://github.com/SonaBIMSandroDASILVA/DockableTestAddinManager
We hope this helps you reproduce the issue on your side and investigate further.
Thank you for your time and assistance. Please let us know if further details or clarifications are needed.