Our 3D CAD supplier models have been moved to 3Dfindit.com, the new visual search engine for 3D CAD, CAE & BIM models.
You can log in there with your existing account of this site.
The content remains free of charge.
1.1.6.10.1. Tweakmenu: Adjust
menus, menu items, toolbars, icons and context menu commands
1.1.6.10.1.5. Scripting with
"Tweakmenu"
|
|
---|---|
Prev | Next |
If you want to
work with the new tweakmenu, you must register
your action in the configs and in the PApplicationPool. You must
only write the name of your action into the config. In your implementation
you must only call registerAction via an instance
from PApplicationPool. If you are
coding with visual basic you must only call application.commands.add(“<name of
action>”). After you have registered the action, you must
only set other properties (e.g. icon path, …). The difference as compared
to the "old" tweakmenu is that you don’t register menu or toolbar in the
application. Tweakmenu makes the registerToolbar and registerMenu step via your
entries in the menuvisibility-config
and
menustructure-config
. Furthermore
actions from the tweakmenu have an additional property autoRegistered. If you want to
check whether an action exists, you must now check the value of that
property. If the value is true, the action is registered by the tweakmenu.
Otherwise the value is false and the action is registered by the
application. The query whether an action exists, will always return true.
The reason for this approach is that the tweakmenu registers all actions
from menuvisibility-config
like a
prototype.