Hi,
I would like to use Autoloader (.bundle) to load my dll when Autocad Map 3D 2021 starts, but I have an issue.
My module adds elements to the main ribbon but it seems that the dll is loaded before the ribbon is initialized, so it does not work.
Is there a solution to configure Autoloader to load my dll after the Autocad UI initialization ?
When I use NETLOAD, everything is ok.
Thanks !
Solved! Go to Solution.
Hi,
I would like to use Autoloader (.bundle) to load my dll when Autocad Map 3D 2021 starts, but I have an issue.
My module adds elements to the main ribbon but it seems that the dll is loaded before the ribbon is initialized, so it does not work.
Is there a solution to configure Autoloader to load my dll after the Autocad UI initialization ?
When I use NETLOAD, everything is ok.
Thanks !
Solved! Go to Solution.
Solved by norman.yuan. Go to Solution.
It is not very clear to me: what do you mean "My module adds elements to the main ribbon...".
If I have to guess, I assume that your code runs after loaded via IExtensionApplication.Initialize(), and in the Initialize() your code update the existing/main ribbon. If that is what your code does, then, you SHOULD NOT assume certain ribbon item (Tab, or Panel, or button...) is available for your code to manipulation; it is also possible the Ribbon control itself may not available when your code is loaded (it is very likely what you have experienced).
If your code is to update the ribbon menu when loaded, you do not let the code to reach the ribbon right away. Instead, you set up Application.Idle event handler, meaning, after your code loaded, it will wait until AutoCAD finishes its startup actions (depending on the versions of verticals, how many plugins to be loaded at beginning, it would take short or long time). Then in the Idle event handler, you still need to test if the Ribbon control is available or not (some user may be "very-smart" to disable the ribbon!) and only go ahead with your ribbon manipulating code when the ribbon control is available.
HTH
Norman Yuan
It is not very clear to me: what do you mean "My module adds elements to the main ribbon...".
If I have to guess, I assume that your code runs after loaded via IExtensionApplication.Initialize(), and in the Initialize() your code update the existing/main ribbon. If that is what your code does, then, you SHOULD NOT assume certain ribbon item (Tab, or Panel, or button...) is available for your code to manipulation; it is also possible the Ribbon control itself may not available when your code is loaded (it is very likely what you have experienced).
If your code is to update the ribbon menu when loaded, you do not let the code to reach the ribbon right away. Instead, you set up Application.Idle event handler, meaning, after your code loaded, it will wait until AutoCAD finishes its startup actions (depending on the versions of verticals, how many plugins to be loaded at beginning, it would take short or long time). Then in the Idle event handler, you still need to test if the Ribbon control is available or not (some user may be "very-smart" to disable the ribbon!) and only go ahead with your ribbon manipulating code when the ribbon control is available.
HTH
Norman Yuan
I didn't know this Application idle event.
Now, handling this event, all works fine.
Thank you
I didn't know this Application idle event.
Now, handling this event, all works fine.
Thank you
Can't find what you're looking for? Ask the community or share your knowledge.