First we create a class called CommandColorPicker that extends the CommandBase class. Let us create a simple command that draws a line and inserts a ColorPicker into the DraftSight application. These methods use the DraftSight API to create, update, fetch and delete UserInterface elements (which are objects). The Ribbon class uses Ribbon namespace and has the methods CreateUserInterfaceAndCommands(), RemoveUserInterface() methods. If you are using a 32-bit operating system chose the platform target as x86. If you are using a 64-bit operating system chose the platform target as 圆4. Using Visual Studio build the solution in Release mode. Now we are ready to use the Ribbon Sample of DraftSight API to customize the Ribbon User Interface. The DraftSight API Type Libraries and P rimary Interop Assemblies are as follows: Compile the sample code in C:\Program Files\Dassault Systemes\DraftSight\APISDK\samples\C#\Simple\Ribbon using Visual Studio (as administrator) and load the solution. Next, activate the Professional Trial from within DraftSight.Ĭompile the sample code in C:\Program Files\Dassault Systemes\DraftSight\APISDK\samples\C#\Simple\Ribbon using Visual Studio (as administrator) and load the solution. If you don’t have DraftSight Enterprise or Professional, download the free trial from the website. The next step is to set up the Programming Environment and Compile the Code. If you are using OSx or Linux operating, they only support C and JavaScript Only. Familiar with any of the following languages: C#, native C , JavaScript, VB.DraftSight Professional/Enterprise version.If you are using Microsoft Windows, you’ll require: The next question you might ask is “What do I need to customise it?”. Well, the Ribbon User Interface is a rich command presentation system that provides an alternative to the layered Menus and task panes of the Classic Windows versions. So, the first question you might ask is “What is the Ribbon User Interface?”. In today’s blog, we are going to continue talking about the DraftSight API and how you can use it to customise the Ribbon User Interface.īe warned, if you thought that the previous blog on the DraftSight API was text heavy, then you might want to take a deep breath before tackling this blog! In our last blog, we talked about the DraftSight API and gave an brief insight into it and what it can do.
0 Comments
Leave a Reply. |