Create a DLL
Wed 22 Jan 2020 - 12:40
Hi,Apologies if this information already exists somewhere, I couldn’t find the information on this site. I’d like to turn some of the common methods we have created into a DLL that we would reference in Taskflow. I do have some information from our site visit last year but the notes I made were not complete. I know that once we have created the DLL we can make reference to it via the advanced scripting window but I’m not too sure on how to create the DLL in the first place. If it needs to be done in Visual Studio what sort of project do I need to create and what supporting DLL for the OMS framework will I need to reference? any information you have will be appreciated.Many thanks in advance
___________________________________________________________________________________________________________________________________
There are a number of ways of achieving this, Distributed Assemblies allow you to have an assembly registered and distributed to the client that could hold common functionality. These have version dependencies so can be managed in the admin kit. Renato - Is there any documents covering this feature?
___________________________________________________________________________________________________________________________________
I have added a Distributed Assemblies document to the Developer SDK Documents list, accessible via the Downloads link on the Support menu. This is a guide to referencing external code libraries from within Matter Centre objects and how to use the Distributed Assemblies tool in the OMS Framework SDK.
___________________________________________________________________________________________________________________________________
Thanks for that, it's a much better document than the notes I created!What I am having some trouble with is the creation of the DLL itself. I have common methods in Taskflow, and I assume I would copy and paste the code into a certain type of project in Visual Studio. The code makes references to OMS so I would also need to make a reference to another DLL for the code to compile. I will then follow the steps in the document to add the assembly into matter centre. do you have any instructions on this process such as what type of project to create and what OMS DLL to reference? thanks
___________________________________________________________________________________________________________________________________
Hi Mike, We create projects of type “Class Library” which by default compiles to a DLL. We generally reference
If you are simply creating a class library i.e. no forms etc. it would probably be good to start a new Class Library project (Visual C# -> Windows -> Class Library). Give it a name etc. In the Solution Explorer, right-click References and navigate to the OMS assemblies directory i.e.
C:\Program Files\FWBS\OMS Matter Centre
and select the library you wish to reference. There may be more than one so reference them in the same way. Then in the class library, you would enter in the using section the name of the OMS library i.e. using FWBS.Common; etc. and then you can access the methods therein. Once the library has been built, creating the DLL, you would distribute it so that users picked it up when they connect to and use Matter Centre.
___________________________________________________________________________________________________________________________________
Just a quick note : when I say there may be more than one OMS library in the assemblies directory, I meant more than one of interest to you Mike.
___________________________________________________________________________________________________________________________________
You need to remember these are version dependant so you will need to recompile your solution and add the later version Distributed Assemblies for any newer build of the framework.
___________________________________________________________________________________________________________________________________
If you you are referring to Taskflow classes you'll also need an FWBS.OMS.FileManagement reference as well
___________________________________________________________________________________________________________________________________
Thanks for all your replies. I've referenced the following DLL's in my VS project.
and I've put the following using statements
I am having a few errors with certain lines of code when I try and build AddFileEvent, CompleteTask, UpdatePlan, MsgBoxCurrentPlan. The name 'AddFileEvent' does not exist in the current context”I've checked the help file and it appears that AddFileEvent is part of the FWBS.OMS.FileManagement assembly. It has been referenced and the reference works fine for lines of code such as
FWBS.OMS.FileManagement.Milestones. Task task
Any idea why it's not picking up the assembly reference?again thanks for all your help
___________________________________________________________________________________________________________________________________
Hi Mike These are some of the helper methods that were made available to our Taskflow scripting environment. Try adding something like this: public class CommonMethod : FWBS.OMS.FileManagement.ApplicationScriptType
Peter
___________________________________________________________________________________________________________________________________
I've just had a peak at my test code inside Visual Studio and these are my references:
___________________________________________________________________________________________________________________________________
That's great, made a reference to System.Core to get
and the code now builds successfully.thanks for all your help Mike
___________________________________________________________________________________________________________________________________
There are a number of ways of achieving this, Distributed Assemblies allow you to have an assembly registered and distributed to the client that could hold common functionality. These have version dependencies so can be managed in the admin kit. Renato - Is there any documents covering this feature?
___________________________________________________________________________________________________________________________________
I have added a Distributed Assemblies document to the Developer SDK Documents list, accessible via the Downloads link on the Support menu. This is a guide to referencing external code libraries from within Matter Centre objects and how to use the Distributed Assemblies tool in the OMS Framework SDK.
___________________________________________________________________________________________________________________________________
Thanks for that, it's a much better document than the notes I created!What I am having some trouble with is the creation of the DLL itself. I have common methods in Taskflow, and I assume I would copy and paste the code into a certain type of project in Visual Studio. The code makes references to OMS so I would also need to make a reference to another DLL for the code to compile. I will then follow the steps in the document to add the assembly into matter centre. do you have any instructions on this process such as what type of project to create and what OMS DLL to reference? thanks
___________________________________________________________________________________________________________________________________
Hi Mike, We create projects of type “Class Library” which by default compiles to a DLL. We generally reference
- Code:
FWBS.Common
FWBS.Common.Licensing
FWBS.Common.UI
OMS.Data
OMS.Library
OMS.UIG
If you are simply creating a class library i.e. no forms etc. it would probably be good to start a new Class Library project (Visual C# -> Windows -> Class Library). Give it a name etc. In the Solution Explorer, right-click References and navigate to the OMS assemblies directory i.e.
C:\Program Files\FWBS\OMS Matter Centre
and select the library you wish to reference. There may be more than one so reference them in the same way. Then in the class library, you would enter in the using section the name of the OMS library i.e. using FWBS.Common; etc. and then you can access the methods therein. Once the library has been built, creating the DLL, you would distribute it so that users picked it up when they connect to and use Matter Centre.
___________________________________________________________________________________________________________________________________
Just a quick note : when I say there may be more than one OMS library in the assemblies directory, I meant more than one of interest to you Mike.
___________________________________________________________________________________________________________________________________
You need to remember these are version dependant so you will need to recompile your solution and add the later version Distributed Assemblies for any newer build of the framework.
___________________________________________________________________________________________________________________________________
If you you are referring to Taskflow classes you'll also need an FWBS.OMS.FileManagement reference as well
___________________________________________________________________________________________________________________________________
Thanks for all your replies. I've referenced the following DLL's in my VS project.
- Code:
FWBS.Common
FWBS.Common.Licensing
FWBS.Common.UI
OMS.Data
OMS.Library
OMS.UI
FWBS.OMS.FileManagement
and I've put the following using statements
- Code:
using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using System.Xml;
using System.Windows.Forms;
using FWBS.Common.UI;
using FWBS.Common;
using FWBS.OMS;
using FWBS.OMS.UI.Windows;
using FWBS.OMS.FileManagement;
using FWBS.OMS.UI;
using FWBS.OMS.Data;
I am having a few errors with certain lines of code when I try and build AddFileEvent, CompleteTask, UpdatePlan, MsgBoxCurrentPlan. The name 'AddFileEvent' does not exist in the current context”I've checked the help file and it appears that AddFileEvent is part of the FWBS.OMS.FileManagement assembly. It has been referenced and the reference works fine for lines of code such as
FWBS.OMS.FileManagement.Milestones. Task task
Any idea why it's not picking up the assembly reference?again thanks for all your help
___________________________________________________________________________________________________________________________________
Hi Mike These are some of the helper methods that were made available to our Taskflow scripting environment. Try adding something like this: public class CommonMethod : FWBS.OMS.FileManagement.ApplicationScriptType
Peter
___________________________________________________________________________________________________________________________________
I've just had a peak at my test code inside Visual Studio and these are my references:
- Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using FWBS.Common.UI;
using FWBS.Common;
using FWBS.OMS;
using FWBS.OMS.UI.Windows;
using FWBS.OMS.FileManagement;
___________________________________________________________________________________________________________________________________
That's great, made a reference to System.Core to get
- Code:
using System.Linq
- FWBS.OMS.FileManagement.ApplicationScriptType
and the code now builds successfully.thanks for all your help Mike
Permissions in this forum:
You cannot reply to topics in this forum
|
|