is there a guide for creating custom tools?

V8i SS4

Subject line says it all. I need a beginner's guide to creating custom tools and task panes.

thanks

Parents
  • Hi David,

    Unknown said:
    Subject line says it all.

    I guess it does not say all, because by "custom tools" (at least) two different topics can be discussed:

    • Custom tools in terms of custom icon /toolbars / tasks / workflows. When an icon calls MicroStation key-in, e.g. with specific setting, parameters, template etc, no programming is involved. This is covered by MicroStation help and I guess (but have not enough time to search and verify) there are also some information in MicroStation wiki and Bentley Learn.
    • Custom tools in terms of own tool itself (can be even without any GUI), which is closer to development. In such case next question is "What language and API do you want to use?". MicroStation VBA contains quite a lot of code snippets and examples, from simple macros to explanation how to implement own primitive and locations tools. Example mvba file (with another examples) is also delivered as a part of MicroStation installation.

    With regards,

      Jan

Reply
  • Hi David,

    Unknown said:
    Subject line says it all.

    I guess it does not say all, because by "custom tools" (at least) two different topics can be discussed:

    • Custom tools in terms of custom icon /toolbars / tasks / workflows. When an icon calls MicroStation key-in, e.g. with specific setting, parameters, template etc, no programming is involved. This is covered by MicroStation help and I guess (but have not enough time to search and verify) there are also some information in MicroStation wiki and Bentley Learn.
    • Custom tools in terms of own tool itself (can be even without any GUI), which is closer to development. In such case next question is "What language and API do you want to use?". MicroStation VBA contains quite a lot of code snippets and examples, from simple macros to explanation how to implement own primitive and locations tools. Example mvba file (with another examples) is also delivered as a part of MicroStation installation.

    With regards,

      Jan

Children
  • Sorry, my ignorance is showing.

    The first category (I think) - I want to create a task pane that primarily runs out of the box Microstation commands. I don't plan to write any more code than I have to muddle my way through to accomplish what I want to do.

    Example - I want a tool that sets a certain dimension style and level active for the user, then dimensions a selected element according to parameters: true alignment, automatic location, linear size.

    Example 2 - I want a tool that runs a saved batch process calling up the command file from a networked location.

  • It doesn't sound like you have to write any code at all.

    Example 1 - Sounds a lot like what an Element Template does.

    Example 2 - Use Workspace > Customize to create a custom Toolbox with a command button to call your custom batch process.

    Both Element Templates and custom toolboxes need to be created in a dgnlib file. For the custom toolbox the dgnlib file has to be referenced in the MS_GUIDGNLIBLIST variable.

    Rod Wing
    Senior Systems Analyst

  • Hi David,

    Unknown said:
    my ignorance is showing

    That's definitely not ignorance ... MicroStation always offers more tools, options and ways how to solve a particular need (and some from them are not easy to discover ;-)

    Unknown said:
    I want to create a task pane that primarily runs out of the box Microstation commands.

    I agree with Rod there is probably no need to write any line of the code and custom tools plus templates should solve your needs.

    To extend Rod's answer:

    • Element Templates allow to define sets of standardized element settings. By default they are only attributes like level or color, but at right button menu you can add others like Text Style name, Cell Library and Cell names etc.
    • Custom tools (organized in toolboxes, tasks and workflows) define what tool will be used. It's achieved using a proper key-in, which is crucial. Every tool contains also definition whether the element template should be activated and used when the tool is used.
    • To extend tool setting (because both element templates and tool parameters don't cover everything), you can use "set item toolsettings" key-in (e.g. to start Place Smart line tool with Segment type = Lines and Vertext type = Rounded, the key-in will be "place smartline;set item toolsettings=0;set item toolsettings=1").

    ... the combination of custom tools, element templates and MicroStation key-ins (especially mentioned "set item toolsettings") is really powerful and helpful.

    With regards,

      Jan

  • required keyin would show something like this:

    mdl load BATCHPROCESS; BATCHPROCESS OPEN yourfile.bprc

    Ivo Blaauw
    = = = = = = = = = = = = =
    Look what the CAD dragged in...