Writing Your First Autodesk Revit Model Review Plug-In

Size: px
Start display at page:

Download "Writing Your First Autodesk Revit Model Review Plug-In"

Transcription

1 Writing Your First Autodesk Revit Model Review Plug-In R. Robert Bell Sparling CP5880 The Revit Model Review plug-in is a great tool for checking a Revit model for matching the standards your company has created. Even better, the tool can fix issues that are found with the click of a button. However, the provided set of tests is basic and may not cover all the types of model standards your company believes are important. Fortunately, there is an API to create additional tests as plug-ins to the Model Review plug-in. This class will present step-by-step instructions for creating a plugin that you can use to improve collaboration in your Revit projects. Learning Objectives At the end of this class, you will be able to: Locate the API documentation Create the appropriate class module Implement the interface methods Deploy the plug-in About the Speaker Robert is the design technology manager for Sparling, a specialty electrical engineering and technology consulting firm in the United States, headquartered in Seattle, Washington. He provides strategic direction, technical oversight, and high-level support for the Sparling enterprise design and production technology systems. He is instrumental in positioning Sparling as an industry and client leader in leveraging technology in virtual building and design. Robert has been writing code for customizing AutoCAD since the release of AutoCAD v2.5. rbell@sparling.com

2 Introduction The Model Review add-in provides a great way to check a model for issues without manually or visually inspecting the model. The add-in not only checks the model, but can also correct some of the issues it exposes. The developer of the tool also provided an API to create additional plug-ins for the Model Review add-in. This makes it possible to expand the functionality of the add-in to meet the needs of your company. This handout supplements the video recording of this class. Locate the API documentation The API documentation consists for a PDF and a sample Visual Studio project. Both are located in the following folder for Revit 2012 installations: Folder Location 64-bit operating systems %ProgramFiles(x86)%\Autodesk\Autodesk Revit Model Review 2012\Plugin-Source 32-bit operating systems %ProgramFiles%\Autodesk\Autodesk Revit Model Review 2012\Plugin-Source Developing_ModelReview_Plugins.pdf After an introduction, the PDF, titled "Developing Plug-in Checks for Autodesk Revit Model Review", provides an overview of the methods that can be implemented in the plug-in by an interface to the Model Review add-in. It goes on to describe the procedure for creating a new Model Review plug-in. There is an explanation of the filtering mechanism used by the Model review add-in which the plug-in can initialize. The structure of the data passed between the addin and the plug-in is documented in a table. Finally, the methods in the interface are described. Sample Visual Studio Project The sample project (located in a subfolder named SamplePlugin in the folder noted above) will not run without modification in Revit It was written for earlier versions of Revit and was not updated for Revit Therefore the target framework is incorrect, references need to be corrected, and the transaction model has changed. Therefore, this class is presented to provide a working plug-in for Revit Create the appropriate class module The "Developing Plug-in Checks" documentation outlines the procedure for creating a new Model Review plug-in and is as follows: Procedure 1. Create a new Visual Studio Class Library Project 2

3 2. Add a reference to the RevitAPI.dll, located in Revit's Program folder. a. A reference to RevitAPIUI.dll is not required, but needed if you plan on using the Revit UI. 3. Add a reference to ModelReviewPlugins.dll, located in the main Autodesk Revit Model Review folder. 4. Create a class to implement the check 5. Add the IPluginCheck interface to the class 6. Implement the methods of the interface (see below) 7. Build the project 8. Copy the resulting DLL to either the Plugins subfolder located in the main Autodesk Revit Model Review folder or in an alternate folder as specified in the add-in interface. After completing the procedure with a successful build, the new plug-in will be available in the add-in Manage interface's menu under Check> Add> Plugins. Implement the interface methods There are five methods in the IPluginCheck interface. Two are required to be implemented. The other three add functionality and therefore are often implemented. Initialize public void Initialize(ICheckData data) This is a required method. The method initializes information about the check. Note that a PluginGUID should be provided and you should not replicate an existing GUID in a new plug-in. Configure public void Configure(System.Windows.Forms.IWin32Window window, ICheckData data) This is an optional method. Use it to gather configuration information from the user when the check needs to support user configuration. GetReportVariables public List<ReportVariable> GetReportVariables() This is an optional method. This method allows you to create variables that will be used in the report. The add-in's configuration tool uses this method. RunCheck public void RunCheck(ICheckData data) This is a required method. It performs the check, determines if the checks passes or fails, and provides supporting data. There is a typical process that should be followed by the code implementing this method: 1. Retrieve configuration data 2. Retrieve a list of objects (the filtering mechanism can reduce the number of objects) 3. Determine pass or fail 3

4 4. Build a report 5. Build a results tree 6. Store results CorrectCheck public void CorrectCheck(System.Windows.Forms.IWin32Window window, ICheckData data) This is an optional method. It is called when the user clicks on the Correct button. It should change the Revit model so that the bad objects are corrected and the objects would now pass a check. Note that this correction is running in a modeless application so it is mandatory to use transactions. Also, never store objects directly, instead store object IDs. Finally, never assume the object exists; always check for a valid object. After the correction is complete the plug-in check is automatically run so there is no need to reset the results in this method. Deploy the plug-in Check files that use a plug-in still need to be added to the Model Review check file list. This is done by using the add-in Manage interface's menu, Profile> Edit> Standards> Add. This edits a file in the main Autodesk Revit Model Review folder called ModelReview.config, which is an XML-based file. This folder is read-only to normal users so either Revit needs to be run as an Administrator to use the interface to add the check file, or the file needs to be externally edited and replaced using administrative privileges. Note that the location of the plugin DLL does not need to be in the main Autodesk Revit Model Review folder structure when an alternate location is specified in the Manage interface so the plugin could be located in a separate folder where the user has modify rights. But this still does not alleviate the read-only issue with the configuration file. Conclusion This working project, along with the API documentation, should give you the confidence to develop your own plug-ins to expand the functionality of Autodesk's Revit Model Review add-in. 4

5 Code Samples Main.cs using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Windows.Forms; using BIMreviewPlugins; using Autodesk.Revit.ApplicationServices; using Autodesk.Revit.UI; using Autodesk.Revit.DB; using Autodesk.Revit.DB.Architecture; using Autodesk.Revit.DB.Structure; using Autodesk.Revit.DB.Mechanical; using Autodesk.Revit.DB.Electrical; using Autodesk.Revit.DB.Plumbing; namespace Sparling_Model_Review_Plug_In public class Reference_Planes_On_Specified_Workset: IPluginCheck #region Declarations private string _worksetname; private int _worksetid; private IList<Workset> _worksets; #endregion #region PrivateMethods private string buildbadelementtable (List<ReferencePlaneResult> badelements) // make an HTML table for the report StringBuilder sb = new StringBuilder(); sb.appendline("<table border='1'>"); sb.appendline(string.format( "<tr><th>0</th><th>1</th><th>2</th></tr>", CommonResources.String_ID, CommonResources.String_Type, CommonResources.String_Problem)); for (int i = 0; i < badelements.count; i++) string prob = string.format( "0 " + CommonResources.String_Is + " 1 " + CommonResources.String_AndNot + " 2", CommonResources.String_Workset, badelements[i].worksetname, _worksetname); sb.appendformat( "<tr><td>0</td><td>1</td><td>2</td></tr>", badelements[i].id, CommonResources.String_ReferencePlane, prob); sb.appendline("</table>"); return sb.tostring(); private TreeNode buildelementtree(list<referenceplaneresult> badelements, ICheckData data) TreeNode node = new TreeNode(CommonResources.String_ReferencePlanes); foreach (ReferencePlaneResult e in badelements) TreeNode elementnode = new TreeNode(string.Format( "0 (1=2)", e.name, CommonResources.String_ID, e.id.tostring())); 5

6 // use the Tag to store whatever data you want // (recommend the ID or UniqueID for an element) // this will be used later for highlighting, etc. elementnode.tag = e.id; node.nodes.add(elementnode); return node; private IList<Workset> getworksets (ICheckData data) FilteredWorksetCollector worksetscollector = new FilteredWorksetCollector(data.RevitDocument); worksetscollector.ofkind(worksetkind.userworkset); IList<Workset> worksets = worksetscollector.toworksets(); return worksets; private WorksetId getworksetid (string wsname) WorksetId wsid = null; foreach (Workset workset in _worksets) if (workset.name == wsname) wsid = workset.id; _worksetid = workset.id.integervalue; return wsid; private string getworksetname (int chkid) string wsname = string.empty; foreach (Workset workset in _worksets) if (workset.id.integervalue == chkid) wsname = workset.name; return wsname; #endregion #region IPluginCheck Members public void Initialize(ICheckData data) // set up basic check information data.filter = CheckInfo.FilterType.Elements; data.filtersubtypes = new string[1] CommonResources.String_RevitReferencePlane; data.isconfigurable = true; data.correctable = true; data.supportsfamilydocuments = false; // generate your own GUID and place it here data.pluginguid = "90AE4CA5-9FDE-4837-BA68-420F07A0768E"; // initialize configuration data in case someone runs it without configuration if (data.configdata == null) data.configdata = CommonResources.String_SharedLevelsGrids; _worksetname = data.configdata; // fail/pass messages data.failmessage = "<B>%CheckName%: %CheckResult%</B><BR/><BR/><P>" + CommonResources.String_ThereWere + " NumberOfBadElements " + CommonResources.String_SomePlanesFail + "</P>BadElementTable"; data.passmessage = "<B>%CheckName%: %CheckResult%</B><BR/><BR/><P>" + CommonResources.String_AllPlanesOK +"</P>"; 6

7 public void Configure(System.Windows.Forms.IWin32Window window, ICheckData data) // get previous configuration data if (data.configdata!= null) _worksetname = data.configdata; SpecifyWorksetForm cfgform = new SpecifyWorksetForm(); cfgform.selectedworkset = _worksetname; if (cfgform.showdialog(window) == DialogResult.OK) // store configuration as string to be persisted in the check file data.configdata = cfgform.selectedworkset; _worksetname = data.configdata; public List<ReportVariable> GetReportVariables() // fill in the report variables, if any List<ReportVariable> vars = new List<ReportVariable>(); vars.add( new ReportVariable( ReportVariable.VariableTypeEnum.Value, "NumberOfBadElements" ) ); vars.add( new ReportVariable( ReportVariable.VariableTypeEnum.Table, "BadElementTable" ) ); return vars; public void RunCheck(ICheckData data) // unpack the config data _worksetname = data.configdata; // get workset ID of target workset _worksets = getworksets(data); WorksetId wsid = getworksetid(_worksetname); // create a structure to store the bad results List<ReferencePlaneResult> badelements = new List<ReferencePlaneResult>(); // check only when target workset is found if (wsid!= null) // the filterdata contains the objects to check (if appropriate) if (data.filterdata!= null) foreach (object obj in data.filterdata) ReferencePlane myref = obj as ReferencePlane; if (myref!= null) // test the reference plane Parameter wsval = myref.get_parameter("workset"); if (wsval == null) continue; if (wsval.asinteger()!= wsid.integervalue) ReferencePlaneResult result = new ReferencePlaneResult(myRef); result.worksetname = getworksetname(wsval.asinteger()); badelements.add(result); else MessageBox.Show(CommonResources.String_The + " " + _worksetname + " " + CommonResources.String_WorksetNotFound, CommonResources.String_UnneededCheckTitle, MessageBoxButtons.OK, MessageBoxIcon.Information); data.result = CheckInfo.ResultType.Passed; 7

8 // check status if (badelements.count == 0) data.result = CheckInfo.ResultType.Passed; else data.result = CheckInfo.ResultType.Failed; // store the bad result to be returned later for correction data.resultdata = badelements; // build the replaceable tokens for the report data.reporttokens = new Dictionary<string, string>(); data.reporttokens.add("numberofbadelements", badelements.count.tostring()); data.reporttokens.add("badelementtable", buildbadelementtable(badelements)); // populate the node tree data.resultstree = buildelementtree(badelements, data); public void CorrectCheck(System.Windows.Forms.IWin32Window window, ICheckData data) // go thru each of the reference planes List<ReferencePlaneResult> warnings = data.resultdata as List<ReferencePlaneResult>; if (warnings == null) return; // we need to do this in a transaction Transaction trans = new Transaction(data.RevitDocument); trans.start("fixreferenceplaneworkset"); foreach (ReferencePlaneResult result in warnings) // get the element Autodesk.Revit.DB.ElementId eid = new Autodesk.Revit.DB.ElementId(result.Id); Element e = data.revitdocument.get_element(eid); if (e!= null) // get the parameter Parameter p = e.get_parameter("workset"); if (p!= null) p.set(_worksetid); trans.commit(); #endregion ReferencePlaneResult.cs using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Sparling_Model_Review_Plug_In /// <summary> /// Simple class to represent a failed reference plane result /// </summary> class ReferencePlaneResult public string Name; public int Id; public string WorksetName; public ReferencePlaneResult(Autodesk.Revit.DB.Element e) Name = e.name; Id = e.id.integervalue; 8

9 SpecifyWorksetForm.cs using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namespace Sparling_Model_Review_Plug_In public partial class SpecifyWorksetForm : Form private string _selectedworkset; public string SelectedWorkset get return _selectedworkset; set _selectedworkset = value; public SpecifyWorksetForm() InitializeComponent(); private bool ValidateInput() if (inpworksetname.text.trim() == string.empty) MessageBox.Show(this, CommonResources.String_SpecifyWorkset, CommonResources.String_SpecifyWorksetTitle); inpworksetname.focus(); return false; return true; private void SpecifyWorksetForm_Load(object sender, EventArgs e) this.text = CommonResources.String_SpecifyWorksetTitle; label1.text = CommonResources.String_SpecifyWorksetLabel; inpok.text = CommonResources.String_OK; inpcancel.text = CommonResources.String_Cancel; inpworksetname.text = _selectedworkset; private void inpok_click(object sender, EventArgs e) if (ValidateInput() == true) _selectedworkset = inpworksetname.text.trim(); this.dialogresult = DialogResult.OK; this.close(); CommonResources String_AllPlanesOK All reference planes met the criteria of this check. String_AndNot and not String_Cancel Cancel String_ID ID String_Is is String_OK OK String_Problem Problem String_ReferencePlane Reference Plane String_ReferencePlanes Reference Planes String_RevitReferencePlane ReferencePlane String_SelectWorkset Select Workset String_SharedLevelsGrids Shared Levels and Grids String_SomePlanesFail reference planes which did not meet the criteria of this check. 9

10 String_SpecifyWorkset You must specify a workset name. String_SpecifyWorksetLabel Specify the Workset that Reference Planes should be on: String_SpecifyWorksetTitle Specify Workset String_The The String_ThereWere There were String_Type Type String_UnneededCheckTitle Unneeded Check String_Workset Workset String_WorksetNotFound workset cannot be found. Form Image 10

CALCULATOR APPLICATION

CALCULATOR APPLICATION CALCULATOR APPLICATION Form1.cs using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms;

More information

Now find the button component in the tool box. [if toolbox isn't present click VIEW on the top and click toolbox]

Now find the button component in the tool box. [if toolbox isn't present click VIEW on the top and click toolbox] C# Tutorial - Create a Tic Tac Toe game with Working AI This project will be created in Visual Studio 2010 however you can use any version of Visual Studio to follow along this tutorial. To start open

More information

You can call the project anything you like I will be calling this one project slide show.

You can call the project anything you like I will be calling this one project slide show. C# Tutorial Load all images from a folder Slide Show In this tutorial we will see how to create a C# slide show where you load everything from a single folder and view them through a timer. This exercise

More information

To start we will be using visual studio Start a new C# windows form application project and name it motivational quotes viewer

To start we will be using visual studio Start a new C# windows form application project and name it motivational quotes viewer C# Tutorial Create a Motivational Quotes Viewer Application in Visual Studio In this tutorial we will create a fun little application for Microsoft Windows using Visual Studio. You can use any version

More information

Start Visual Studio, start a new Windows Form project under the C# language, name the project BalloonPop MooICT and click OK.

Start Visual Studio, start a new Windows Form project under the C# language, name the project BalloonPop MooICT and click OK. Start Visual Studio, start a new Windows Form project under the C# language, name the project BalloonPop MooICT and click OK. Before you start - download the game assets from above or on MOOICT.COM to

More information

IBSDK Quick Start Tutorial for C# 2010

IBSDK Quick Start Tutorial for C# 2010 IB-SDK-00003 Ver. 3.0.0 2012-04-04 IBSDK Quick Start Tutorial for C# 2010 Copyright @2012, lntegrated Biometrics LLC. All Rights Reserved 1 QuickStart Project C# 2010 Example Follow these steps to setup

More information

CSIS 1624 CLASS TEST 6

CSIS 1624 CLASS TEST 6 CSIS 1624 CLASS TEST 6 Instructions: Use visual studio 2012/2013 Make sure your work is saved correctly Submit your work as instructed by the demmies. This is an open-book test. You may consult the printed

More information

The Open Core Interface SDK has to be installed on your development computer. The SDK can be downloaded at:

The Open Core Interface SDK has to be installed on your development computer. The SDK can be downloaded at: This document describes how to create a simple Windows Forms Application using some Open Core Interface functions in C# with Microsoft Visual Studio Express 2013. 1 Preconditions The Open Core Interface

More information

First start a new Windows Form Application from C# and name it Interest Calculator. We need 3 text boxes. 4 labels. 1 button

First start a new Windows Form Application from C# and name it Interest Calculator. We need 3 text boxes. 4 labels. 1 button Create an Interest Calculator with C# In This tutorial we will create an interest calculator in Visual Studio using C# programming Language. Programming is all about maths now we don t need to know every

More information

Click on the empty form and apply the following options to the properties Windows.

Click on the empty form and apply the following options to the properties Windows. Start New Project In Visual Studio Choose C# Windows Form Application Name it SpaceInvaders and Click OK. Click on the empty form and apply the following options to the properties Windows. This is the

More information

We are going to use some graphics and found a nice little batman running GIF, off course you can use any image you want for the project.

We are going to use some graphics and found a nice little batman running GIF, off course you can use any image you want for the project. C# Tutorial - Create a Batman Gravity Run Game Start a new project in visual studio and call it gravityrun It should be a windows form application with C# Click OK Change the size of the to 800,300 and

More information

Form Properties Window

Form Properties Window C# Tutorial Create a Save The Eggs Item Drop Game in Visual Studio Start Visual Studio, Start a new project. Under the C# language, choose Windows Form Application. Name the project savetheeggs and click

More information

if (say==0) { k.commandtext = "Insert into kullanici(k_adi,sifre) values('" + textbox3.text + "','" + textbox4.text + "')"; k.

if (say==0) { k.commandtext = Insert into kullanici(k_adi,sifre) values(' + textbox3.text + ',' + textbox4.text + '); k. using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using System.Data.SqlClient;

More information

Start Visual Studio and create a new windows form application under C# programming language. Call this project YouTube Alarm Clock.

Start Visual Studio and create a new windows form application under C# programming language. Call this project YouTube Alarm Clock. C# Tutorial - Create a YouTube Alarm Clock in Visual Studio In this tutorial we will create a simple yet elegant YouTube alarm clock in Visual Studio using C# programming language. The main idea for this

More information

Object oriented lab /second year / review/lecturer: yasmin maki

Object oriented lab /second year / review/lecturer: yasmin maki 1) Examples of method (function): Note: the declaration of any method is : method name ( parameters list ).. Method body.. Access modifier : public,protected, private. Return

More information

This is the empty form we will be working with in this game. Look under the properties window and find the following and change them.

This is the empty form we will be working with in this game. Look under the properties window and find the following and change them. We are working on Visual Studio 2010 but this project can be remade in any other version of visual studio. Start a new project in Visual Studio, make this a C# Windows Form Application and name it zombieshooter.

More information

Mastering the Visual LISP Integrated Development Environment

Mastering the Visual LISP Integrated Development Environment Mastering the Visual LISP Integrated Development Environment R. Robert Bell Sparling SD7297 How do you create and edit your AutoLISP programming language software code? Are you using a text editor such

More information

Answer on Question# Programming, C#

Answer on Question# Programming, C# Answer on Question#38723 - Programming, C# 1. The development team of SoftSols Inc. has revamped the software according to the requirements of FlyHigh Airlines and is in the process of testing the software.

More information

Start Visual Studio, create a new project called Helicopter Game and press OK

Start Visual Studio, create a new project called Helicopter Game and press OK C# Tutorial Create a helicopter flying and shooting game in visual studio In this tutorial we will create a fun little helicopter game in visual studio. You will be flying the helicopter which can shoot

More information

// Precondition: None // Postcondition: The address' name has been set to the // specified value set;

// Precondition: None // Postcondition: The address' name has been set to the // specified value set; // File: Address.cs // This classes stores a typical US address consisting of name, // two address lines, city, state, and 5 digit zip code. using System; using System.Collections.Generic; using System.Linq;

More information

Conventions in this tutorial

Conventions in this tutorial This document provides an exercise using Digi JumpStart for Windows Embedded CE 6.0. This document shows how to develop, run, and debug a simple application on your target hardware platform. This tutorial

More information

Huw Talliss Data Structures and Variables. Variables

Huw Talliss Data Structures and Variables. Variables Data Structures and Variables Variables The Regex class represents a read-only regular expression. It also contains static methods that allow use of other regular expression classes without explicitly

More information

Inheriting Windows Forms with Visual C#.NET

Inheriting Windows Forms with Visual C#.NET Inheriting Windows Forms with Visual C#.NET Overview In order to understand the power of OOP, consider, for example, form inheritance, a new feature of.net that lets you create a base form that becomes

More information

Visual Basic/C# Programming (330)

Visual Basic/C# Programming (330) Page 1 of 12 Visual Basic/C# Programming (330) REGIONAL 2017 Production Portion: Program 1: Calendar Analysis (400 points) TOTAL POINTS (400 points) Judge/Graders: Please double check and verify all scores

More information

} } public void getir() { DataTable dt = vt.dtgetir("select* from stok order by stokadi");

} } public void getir() { DataTable dt = vt.dtgetir(select* from stok order by stokadi); Form1 using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms;

More information

// Program 2 - Extra Credit // CIS // Spring // Due: 3/11/2015. // By: Andrew L. Wright. //Edited by : Ben Spalding

// Program 2 - Extra Credit // CIS // Spring // Due: 3/11/2015. // By: Andrew L. Wright. //Edited by : Ben Spalding // Program 2 - Extra Credit // CIS 200-01 // Spring 2015 // Due: 3/11/2015 // By: Andrew L. Wright //Edited by : Ben Spalding // File: Prog2Form.cs // This class creates the main GUI for Program 2. It

More information

Create your own Meme Maker in C#

Create your own Meme Maker in C# Create your own Meme Maker in C# This tutorial will show how to create a meme maker in visual studio 2010 using C#. Now we are using Visual Studio 2010 version you can use any and still get the same result.

More information

Eyes of the Dragon - XNA Part 37 Map Editor Revisited

Eyes of the Dragon - XNA Part 37 Map Editor Revisited Eyes of the Dragon - XNA Part 37 Map Editor Revisited I'm writing these tutorials for the XNA 4.0 framework. Even though Microsoft has ended support for XNA it still runs on all supported operating systems

More information

// Specify SEF file to load. oschema = (edischema) oedidoc.loadschema(spath + sseffilename, SchemaTypeIDConstants. Schema_Standard_Exchange_Format);

// Specify SEF file to load. oschema = (edischema) oedidoc.loadschema(spath + sseffilename, SchemaTypeIDConstants. Schema_Standard_Exchange_Format); using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using Edidev.FrameworkEDI;

More information

Lesson 1: The Basic Plug-in

Lesson 1: The Basic Plug-in Lesson 1: The Basic Plug-in In this lesson you will create your very first basic Autodesk Revit plug-in for copying groups selected by the user to a specified location. Video: A Demonstration of Lesson

More information

Main Game Code. //ok honestly im not sure, if i guess its a class ment for this page called methodtimer that //either uses the timer or set to timer..

Main Game Code. //ok honestly im not sure, if i guess its a class ment for this page called methodtimer that //either uses the timer or set to timer.. using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms;

More information

Mainly three tables namely Teacher, Student and Class for small database of a school. are used. The snapshots of all three tables are shown below.

Mainly three tables namely Teacher, Student and Class for small database of a school. are used. The snapshots of all three tables are shown below. APPENDIX 1 TABLE DETAILS Mainly three tables namely Teacher, Student and Class for small database of a school are used. The snapshots of all three tables are shown below. Details of Class table are shown

More information

Hands-On Lab. Lab: Client Object Model. Lab version: Last updated: 2/23/2011

Hands-On Lab. Lab: Client Object Model. Lab version: Last updated: 2/23/2011 Hands-On Lab Lab: Client Object Model Lab version: 1.0.0 Last updated: 2/23/2011 CONTENTS OVERVIEW... 3 EXERCISE 1: RETRIEVING LISTS... 4 EXERCISE 2: PRINTING A LIST... 8 EXERCISE 3: USING ADO.NET DATA

More information

Representing Recursive Relationships Using REP++ TreeView

Representing Recursive Relationships Using REP++ TreeView Representing Recursive Relationships Using REP++ TreeView Author(s): R&D Department Publication date: May 4, 2006 Revision date: May 2010 2010 Consyst SQL Inc. All rights reserved. Representing Recursive

More information

Using Template Bookmarks for Automating Microsoft Word Reports

Using Template Bookmarks for Automating Microsoft Word Reports Using Template Bookmarks for Automating Microsoft Word Reports Darryl Bryk U.S. Army RDECOM-TARDEC Warren, MI 48397 Disclaimer: Reference herein to any specific commercial company, product, process, or

More information

Sub To Srt Converter. This is the source code of this program. It is made in C# with.net 2.0.

Sub To Srt Converter. This is the source code of this program. It is made in C# with.net 2.0. Sub To Srt Converter This is the source code of this program. It is made in C# with.net 2.0. form1.css /* * Name: Sub to srt converter * Programmer: Paunoiu Alexandru Dumitru * Date: 5.11.2007 * Description:

More information

Experiment 5 : Creating a Windows application to interface with 7-Segment LED display

Experiment 5 : Creating a Windows application to interface with 7-Segment LED display Experiment 5 : Creating a Windows application to interface with 7-Segment LED display Objectives : 1) To understand the how Windows Forms in the Windows-based applications. 2) To create a Window Application

More information

C:\homeworks\PenAttention_v13_src\PenAttention_v13_src\PenAttention4\PenAttention\PenAttention.cs 1 using System; 2 using System.Diagnostics; 3 using

C:\homeworks\PenAttention_v13_src\PenAttention_v13_src\PenAttention4\PenAttention\PenAttention.cs 1 using System; 2 using System.Diagnostics; 3 using 1 using System; 2 using System.Diagnostics; 3 using System.Collections.Generic; 4 using System.ComponentModel; 5 using System.Data; 6 using System.Drawing; 7 using System.Text; 8 using System.Windows.Forms;

More information

In-Class Worksheet #4

In-Class Worksheet #4 CSE 459.24 Programming in C# Richard Kidwell In-Class Worksheet #4 Creating a Windows Forms application with Data Binding You should have Visual Studio 2008 open. 1. Create a new Project either from the

More information

UNIT-3. Prepared by R.VINODINI 1

UNIT-3. Prepared by R.VINODINI 1 Prepared by R.VINODINI 1 Prepared by R.VINODINI 2 Prepared by R.VINODINI 3 Prepared by R.VINODINI 4 Prepared by R.VINODINI 5 o o o o Prepared by R.VINODINI 6 Prepared by R.VINODINI 7 Prepared by R.VINODINI

More information

Class Test 4. Question 1. Use notepad to create a console application that displays a stick figure. See figure 1. Question 2

Class Test 4. Question 1. Use notepad to create a console application that displays a stick figure. See figure 1. Question 2 Class Test 4 Marks will be deducted for each of the following: -5 for each class/program that does not contain your name and student number at the top. -2 If program is named anything other than Question1,

More information

How to create an Add-In extension.dll file and make it available from Robot pull down menu. (language C#)

How to create an Add-In extension.dll file and make it available from Robot pull down menu. (language C#) 2018 Autodesk, Inc. All Rights Reserved. Except as otherwise permitted by Autodesk, Inc., this publication, or parts thereof, may not be reproduced in any form, by any method, for any purpose. Certain

More information

CSC 415 ONLINE PHOTOALBUM: THE SEQUEL ASP.NET VERSION

CSC 415 ONLINE PHOTOALBUM: THE SEQUEL ASP.NET VERSION CSC 415 ONLINE PHOTOALBUM: THE SEQUEL ASP.NET VERSION GODFREY MUGANDA In this project, you will convert the Online Photo Album project to run on the ASP.NET platform, using only generic HTTP handlers.

More information

Visual Basic/C# Programming (330)

Visual Basic/C# Programming (330) Page 1 of 16 Visual Basic/C# Programming (330) REGIONAL 2016 Program: Character Stats (400 points) TOTAL POINTS (400 points) Judge/Graders: Please double check and verify all scores and answer keys! Property

More information

NI USB-TC01 Thermocouple Measurement Device

NI USB-TC01 Thermocouple Measurement Device Telemark University College Department of Electrical Engineering, Information Technology and Cybernetics NI USB-TC01 Thermocouple Measurement Device HANS- PETTER HALVORSEN, 2013.02.18 Faculty of Technology,

More information

Developing for Mobile Devices Lab (Part 1 of 2)

Developing for Mobile Devices Lab (Part 1 of 2) Developing for Mobile Devices Lab (Part 1 of 2) Overview Through these two lab sessions you will learn how to create mobile applications for Windows Mobile phones and PDAs. As developing for Windows Mobile

More information

Getting Started with Autodesk Vault Programming

Getting Started with Autodesk Vault Programming Getting Started with Autodesk Vault Programming Doug Redmond Autodesk CP4534 An introduction to the customization options provided through the Vault APIs. Learning Objectives At the end of this class,

More information

XNA 4.0 RPG Tutorials. Part 11b. Game Editors

XNA 4.0 RPG Tutorials. Part 11b. Game Editors XNA 4.0 RPG Tutorials Part 11b Game Editors I'm writing these tutorials for the new XNA 4.0 framework. The tutorials will make more sense if they are read in order. You can find the list of tutorials on

More information

Chapter 8 Advanced GUI Features

Chapter 8 Advanced GUI Features 159 Chapter 8 Advanced GUI Features There are many other features we can easily add to a Windows C# application. We must be able to have menus and dialogs along with many other controls. One workhorse

More information

Eyes of the Dragon - XNA Part 33 Non-Player Character Conversations

Eyes of the Dragon - XNA Part 33 Non-Player Character Conversations Eyes of the Dragon - XNA Part 33 Non-Player Character Conversations I'm writing these tutorials for the XNA 4.0 framework. Even though Microsoft has ended support for XNA it still runs on all supported

More information

XNA 4.0 RPG Tutorials. Part 24. Level Editor Continued

XNA 4.0 RPG Tutorials. Part 24. Level Editor Continued XNA 4.0 RPG Tutorials Part 24 Level Editor Continued I'm writing these tutorials for the new XNA 4.0 framework. The tutorials will make more sense if they are read in order. You can find the list of tutorials

More information

Classes in C# namespace classtest { public class myclass { public myclass() { } } }

Classes in C# namespace classtest { public class myclass { public myclass() { } } } Classes in C# A class is of similar function to our previously used Active X components. The difference between the two is the components are registered with windows and can be shared by different applications,

More information

Chapter 12. Tool Strips, Status Strips, and Splitters

Chapter 12. Tool Strips, Status Strips, and Splitters Chapter 12 Tool Strips, Status Strips, and Splitters Tool Strips Usually called tool bars. The new ToolStrip class replaces the older ToolBar class of.net 1.1. Create easily customized, commonly employed

More information

ArcGIS Pro Extensibility - Building and Deploying Addins with the new DotNet SDK

ArcGIS Pro Extensibility - Building and Deploying Addins with the new DotNet SDK ArcGIS Pro Extensibility - Building and Deploying Addins with the new DotNet SDK Charlie Macleod - Esri Esri UC 2014 Demo Theater New at 10.3 is the ArcGIS Pro Application - Extensibility is provided by

More information

create database ABCD use ABCD create table bolumler ( bolumkodu int primary key, bolumadi varchar(20) )

create database ABCD use ABCD create table bolumler ( bolumkodu int primary key, bolumadi varchar(20) ) create database ABCD use ABCD create table bolumler ( bolumkodu int primary key, bolumadi varchar(20) ) insert into bolumler values(1,'elektrik') insert into bolumler values(2,'makina') insert into bolumler

More information

// Specify SEF file to load. edischema oschema = oedidoc.loadschema(spath + sseffilename, SchemaTypeIDConstants. Schema_Standard_Exchange_Format);

// Specify SEF file to load. edischema oschema = oedidoc.loadschema(spath + sseffilename, SchemaTypeIDConstants. Schema_Standard_Exchange_Format); using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using Edidev.FrameworkEDIx64;

More information

Hands-On Lab (MBL04) Lab Manual Incorporating COM Objects into Your.NET Compact Framework 2.0 Application

Hands-On Lab (MBL04) Lab Manual Incorporating COM Objects into Your.NET Compact Framework 2.0 Application Hands-On Lab (MBL04) Lab Manual Incorporating COM Objects into Your.NET Compact Framework 2.0 Application Please do not remove this manual from the lab Information in this document is subject to change

More information

Chapter 6 Dialogs. Creating a Dialog Style Form

Chapter 6 Dialogs. Creating a Dialog Style Form Chapter 6 Dialogs We all know the importance of dialogs in Windows applications. Dialogs using the.net FCL are very easy to implement if you already know how to use basic controls on forms. A dialog is

More information

private string sconnection = ConfigurationManager.ConnectionStrings["Development"].ConnectionString

private string sconnection = ConfigurationManager.ConnectionStrings[Development].ConnectionString using System; using System.Configuration; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Data.SqlClient; using System.Drawing; using System.Text; using System.Windows.Forms;

More information

Quick Guide for the ServoWorks.NET API 2010/7/13

Quick Guide for the ServoWorks.NET API 2010/7/13 Quick Guide for the ServoWorks.NET API 2010/7/13 This document will guide you through creating a simple sample application that jogs axis 1 in a single direction using Soft Servo Systems ServoWorks.NET

More information

Tutorial 5 Completing the Inventory Application Introducing Programming

Tutorial 5 Completing the Inventory Application Introducing Programming 1 Tutorial 5 Completing the Inventory Application Introducing Programming Outline 5.1 Test-Driving the Inventory Application 5.2 Introduction to C# Code 5.3 Inserting an Event Handler 5.4 Performing a

More information

string spath; string sedifile = "277_005010X228.X12"; string sseffile = "277_005010X228.SemRef.EVAL0.SEF";

string spath; string sedifile = 277_005010X228.X12; string sseffile = 277_005010X228.SemRef.EVAL0.SEF; using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using Edidev.FrameworkEDI; 1 namespace

More information

LISTING PROGRAM. //Find the maximum and minimum values in the array int maxvalue = integers[0]; //start with first element int minvalue = integers[0];

LISTING PROGRAM. //Find the maximum and minimum values in the array int maxvalue = integers[0]; //start with first element int minvalue = integers[0]; 1 LISTING PROGRAM using System; using System.Collections.Generic; using System.Linq; using System.Windows.Forms; namespace SortingApplication static class Program / / The main entry point for

More information

Appendix A Programkod

Appendix A Programkod Appendix A Programkod ProgramForm.cs using System; using System.Text; using System.Windows.Forms; using System.Net; using System.IO; using System.Text.RegularExpressions; using System.Collections.Generic;

More information

Creating SDK plugins

Creating SDK plugins Creating SDK plugins 1. Introduction... 3 2. Architecture... 4 3. SDK plugins... 5 4. Creating plugins from a template in Visual Studio... 6 5. Creating custom action... 9 6. Example of custom action...10

More information

EL-USB-RT API Guide V1.0

EL-USB-RT API Guide V1.0 EL-USB-RT API Guide V1.0 Contents 1 Introduction 2 C++ Sample Dialog Application 3 C++ Sample Observer Pattern Application 4 C# Sample Application 4.1 Capturing USB Device Connect \ Disconnect Events 5

More information

C# winforms gridview

C# winforms gridview C# winforms gridview using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms;

More information

Using the vrealize Orchestrator Operations Client. vrealize Orchestrator 7.5

Using the vrealize Orchestrator Operations Client. vrealize Orchestrator 7.5 Using the vrealize Orchestrator Operations Client vrealize Orchestrator 7.5 You can find the most up-to-date technical documentation on the VMware website at: https://docs.vmware.com/ If you have comments

More information

II. Programming Technologies

II. Programming Technologies II. Programming Technologies II.1 The machine code program Code of algorithm steps + memory addresses: MOV AX,1234h ;0B8h 34h 12h - number (1234h) to AX register MUL WORD PTR [5678h] ;0F7h 26h 78h 56h

More information

User Filter State. Chapter 11. Overview of User Filter State. The PDSAUserFilterState Class

User Filter State. Chapter 11. Overview of User Filter State. The PDSAUserFilterState Class Chapter 11 User Filter State When users visit a search page (or an add, edit and delete page with a set of search filters above the grid), each user will enter search criteria, drill down on a search result

More information

LAMPIRAN A : LISTING PROGRAM

LAMPIRAN A : LISTING PROGRAM LAMPIRAN A : LISTING PROGRAM 1. Form Utama (Cover) using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text;

More information

namespace csharp_gen277x214 { public partial class Form1 : Form { public Form1() { InitializeComponent(); }

namespace csharp_gen277x214 { public partial class Form1 : Form { public Form1() { InitializeComponent(); } using System using System.Collections.Generic using System.ComponentModel using System.Data using System.Drawing using System.Text using System.Windows.Forms using Edidev.FrameworkEDI 1 namespace csharp_gen277x214

More information

Getting Started With AutoCAD Civil 3D.Net Programming

Getting Started With AutoCAD Civil 3D.Net Programming Getting Started With AutoCAD Civil 3D.Net Programming Josh Modglin Advanced Technologies Solutions CP1497 Have you ever wanted to program and customize AutoCAD Civil 3D but cannot seem to make the jump

More information

Using Visual Studio 2017

Using Visual Studio 2017 C H A P T E R 1 Using Visual Studio 2017 In this chapter, I explain the process for installing Visual Studio 2017 and recreate the Party Invites project from Chapter 2 of Pro ASP.NET Core MVC. As you will

More information

FDSc in ICT. Building a Program in C#

FDSc in ICT. Building a Program in C# FDSc in ICT Building a Program in C# Objectives To build a complete application in C# from scratch Make a banking app Make use of: Methods/Functions Classes Inheritance Scenario We have a bank that has

More information

The first program we write will display a picture on a Windows screen, with buttons to make the picture appear and disappear.

The first program we write will display a picture on a Windows screen, with buttons to make the picture appear and disappear. 4 Programming with C#.NET 1 Camera The first program we write will display a picture on a Windows screen, with buttons to make the picture appear and disappear. Begin by loading Microsoft Visual Studio

More information

TARGETPROCESS PLUGIN DEVELOPMENT GUIDE

TARGETPROCESS PLUGIN DEVELOPMENT GUIDE TARGETPROCESS PLUGIN DEVELOPMENT GUIDE v.2.8 Plugin Development Guide This document describes plugins in TargetProcess and provides some usage examples. 1 PLUG IN DEVELOPMENT... 3 CORE ABSTRACTIONS...

More information

Advanced Customization. Charles Macleod, Steve Van Esch

Advanced Customization. Charles Macleod, Steve Van Esch Advanced Customization Charles Macleod, Steve Van Esch Advanced Customization and Extensibility Pro Extensibility Overview - Custom project and application settings - Project options - Multiple Add-ins

More information

Your Company Name. Tel: Fax: Microsoft Visual Studio C# Project Source Code Output

Your Company Name. Tel: Fax: Microsoft Visual Studio C# Project Source Code Output General Date Your Company Name Tel: +44 1234 567 9898 Fax: +44 1234 545 9999 email: info@@company.com Microsoft Visual Studio C# Project Source Code Output Created using VScodePrint Macro Variables Substitution

More information

Visual Studio.NET.NET Framework. Web Services Web Forms Windows Forms. Data and XML classes. Framework Base Classes. Common Language Runtime

Visual Studio.NET.NET Framework. Web Services Web Forms Windows Forms. Data and XML classes. Framework Base Classes. Common Language Runtime Intro C# Intro C# 1 Microsoft's.NET platform and Framework.NET Enterprise Servers Visual Studio.NET.NET Framework.NET Building Block Services Operating system on servers, desktop, and devices Web Services

More information

namespace Gen837X222A1 { public partial class Form1 : Form { public Form1() { InitializeComponent(); }

namespace Gen837X222A1 { public partial class Form1 : Form { public Form1() { InitializeComponent(); } using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using Edidev.FrameworkEDI; 1 namespace

More information

APARAT DE MASURA. Descrierea programului

APARAT DE MASURA. Descrierea programului APARAT DE MASURA Descrierea programului Acest program reprezinta un aparat de masura universal. Acest apparat poate fi modificat in functie de necesitatile utilizatorului. Modificarile pe care aparatul

More information

1 de :02

1 de :02 1 de 6 02-12-2005 18:02!" $%$&&$ ' ( ) ) * +,"* (-)( )(*) ) ). /) %) ( ( -( *)% ) (0 ( " ' * ) *) *)(%* % ) (!%12%! ( ) ( ( )*)3 *) ( *(-)( %. )(( ) *(!() 2 ( (6 &)*7 8 ( 1( -(! ", % ' ( *.() (%) )() (

More information

เว บแอพล เคช น. private void Back_Click(object sender, EventArgs e) { this.webbrowser2.goback(); }

เว บแอพล เคช น. private void Back_Click(object sender, EventArgs e) { this.webbrowser2.goback(); } เว บแอพล เคช น using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namespace

More information

The Gracefulness of the Merging Graph N ** C 4 with Dotnet Framework

The Gracefulness of the Merging Graph N ** C 4 with Dotnet Framework The Gracefulness of the Merging Graph N ** C 4 with Dotnet Framework Solairaju¹, N. Abdul Ali² and R.M. Karthikkeyan 3 1-2 : P.G. & Research Department of Mathematics, Jamal Mohamed College, Trichy 20.

More information

private string sconnection = ConfigurationManager.ConnectionStrings["Development"].ConnectionString

private string sconnection = ConfigurationManager.ConnectionStrings[Development].ConnectionString using System; using System.Configuration; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Data.SqlClient; using System.Drawing; using System.Text; using System.Windows.Forms;

More information

Contents Getting Started... 3 About Scribe Online and Connectors... 3 Scribe Online Services... 3 CDK Components... 3 Audience... 4 Prerequisites...

Contents Getting Started... 3 About Scribe Online and Connectors... 3 Scribe Online Services... 3 CDK Components... 3 Audience... 4 Prerequisites... Contents Getting Started... 3 About Scribe Online and Connectors... 3 Scribe Online Services... 3 CDK Components... 3 Audience... 4 Prerequisites... 4 Requirements... 4 CDK Workflow... 5 Scribe Online

More information

emkt Browserless Coding For C#.Net and Excel

emkt Browserless Coding For C#.Net and Excel emkt Browserless Coding For C#.Net and Excel Browserless Basic Instructions and Sample Code 7/23/2013 Table of Contents Using Excel... 3 Configuring Excel for sending XML to emkt... 3 Sandbox instructions

More information

This is the start of the server code

This is the start of the server code This is the start of the server code using System; using System.Drawing; using System.Collections; using System.ComponentModel; using System.Windows.Forms; using System.Data; using System.Net; using System.Net.Sockets;

More information

2.3 Add GDS Google Map to Visual Studio Toolbox and create a simple map project

2.3 Add GDS Google Map to Visual Studio Toolbox and create a simple map project 1. Introduction GDS Google Map is a Desktop.Net User Control, which can be embedded in Windows Forms Applications or hosted in WPF Applications. It integrates an interactive Google Map into your desktop

More information

Tutorial 6 Enhancing the Inventory Application Introducing Variables, Memory Concepts and Arithmetic

Tutorial 6 Enhancing the Inventory Application Introducing Variables, Memory Concepts and Arithmetic Tutorial 6 Enhancing the Inventory Application Introducing Variables, Memory Concepts and Arithmetic Outline 6.1 Test-Driving the Enhanced Inventory Application 6.2 Variables 6.3 Handling the TextChanged

More information

How to create a simple ASP.NET page to create/search data on baan using baan logic from the BOBS client sample.

How to create a simple ASP.NET page to create/search data on baan using baan logic from the BOBS client sample. How to create a simple ASP.NET page to create/search data on baan using baan logic from the BOBS client sample. Author: Carlos Kassab Date: July/24/2006 First install BOBS(BaaN Ole Broker Server), you

More information

HIDING PACKET SEND THROUGH MULTIPLE TRANSMISSION LINE BY VIRTUALLY IN AD HOC

HIDING PACKET SEND THROUGH MULTIPLE TRANSMISSION LINE BY VIRTUALLY IN AD HOC HIDING PACKET SEND THROUGH MULTIPLE TRANSMISSION LINE BY VIRTUALLY IN AD HOC N. MOHAMED BAYAS 1, Mr. S.Rajesh 2 1 PG Student, 2 Assistant Professor, Department of Computer Science and Engineering, Abstract

More information

ListBox. Class ListBoxTest. Allows users to add and remove items from ListBox Uses event handlers to add to, remove from, and clear list

ListBox. Class ListBoxTest. Allows users to add and remove items from ListBox Uses event handlers to add to, remove from, and clear list C# cont d (C-sharp) (many of these slides are extracted and adapted from Deitel s book and slides, How to Program in C#. They are provided for CSE3403 students only. Not to be published or publicly distributed

More information

User-Defined Controls

User-Defined Controls C# cont d (C-sharp) (many of these slides are extracted and adapted from Deitel s book and slides, How to Program in C#. They are provided for CSE3403 students only. Not to be published or publicly distributed

More information

Tutorial 19 - Microwave Oven Application Building Your Own Classes and Objects

Tutorial 19 - Microwave Oven Application Building Your Own Classes and Objects 1 Tutorial 19 - Microwave Oven Application Building Your Own Classes and Objects Outline 19.1 Test-Driving the Microwave Oven Application 19.2 Designing the Microwave Oven Application 19.3 Adding a New

More information

Lecture 8 Building an MDI Application

Lecture 8 Building an MDI Application Lecture 8 Building an MDI Application Introduction The MDI (Multiple Document Interface) provides a way to display multiple (child) windows forms inside a single main(parent) windows form. In this example

More information

Savoy ActiveX Control User Guide

Savoy ActiveX Control User Guide Savoy ActiveX Control User Guide Jazz Soft, Inc. Revision History 1 Revision History Version Date Name Description 1.00 Jul, 31 st, 2009 Hikaru Okada Created as new document 1.00a Aug, 22 nd, 2009 Hikaru

More information

Activating AspxCodeGen 4.0

Activating AspxCodeGen 4.0 Activating AspxCodeGen 4.0 The first time you open AspxCodeGen 4 Professional Plus edition you will be presented with an activation form as shown in Figure 1. You will not be shown the activation form

More information

Introduction. Create a New Project. Create the Main Form. Assignment 1 Lights Out! in C# GUI Programming 10 points

Introduction. Create a New Project. Create the Main Form. Assignment 1 Lights Out! in C# GUI Programming 10 points Assignment 1 Lights Out! in C# GUI Programming 10 points Introduction In this lab you will create a simple C# application with a menu, some buttons, and an About dialog box. You will learn how to create

More information