Maybe the issue is in line 6 of your FilterForm class code:
Public Sub FilterForm(ByVal dataReference As Aggregate, ByVal bReadOnly As Boolean)
Could you try this and see if you get better results?
Public Sub New(ByVal DataReference As OSIsoft.AF.Asset.DataReference.Aggregate, ByVal bReadOnly As Boolean)
Your FilterForm class needs to have a Public constructor. You only have a Friend/internal constructor which cannot be accessed by the calling code because it is external to your project.
It looks like Daniel types faster than I do!
I'm not sure, Dennis. I probably just had the chance to look into Nicolay's issue a few minutes earlier than you.
Also, you raised a good point.
Having in mind what you said, I just wanted to share a little more about the details of the sample project setup I used in Visual Studio 2010, to look into Nikolay's issue.
I created a class library project where the main class is named StringConcat3, which has a corresponding source file StringConcat3.vb:
In StringConcat3.vb I've included the definition of the ReadOnly Property EditorType:
Public Overrides ReadOnly Property EditorType() As Type 'The EditorType property returns the type of the editor to be used 'to edit this data reference. The editor must inherit from 'Windows.Forms and must have a public constructor that accepts 'this data reference and a boolean read-only flag. Get Return GetType(RollupConfig) End Get End Property
Also, I created a separate form class file named RollupConfig.vb:
and this is the code I've included in RollupConfig.vb:
Friend Class RollupConfig Inherits System.Windows.Forms.Form Public Sub New(ByVal DataReference As OSIsoft.AF.Asset.DataReference.StringConcat3, ByVal _ReadOnly As Boolean) InitializeComponent() '... End Sub '... End Class
This form actually does not do anything (I created it just as a sample for testing this specific issue), but loads ok when called by the click on the "Settings" button in PI System Explorer.
I am attaching the sample project I used.
@Nikolay: I just noticed that Visual Studio 2010 created a resource file (RollupConfig.resx) automatically in the project directory:
So, as I don't have more details about your setup, I am not sure if my comment above still applies to your specific situation, but you may want to look into it anyway.
afdrstringconcat3.zip 63.9 KB
I how use your data reference in process book?
I created my DR works fine in PI AF but when i try to use in Process Book i receive the following message :
"Failed to load 'My DR Name' Plugin: The Plugin type 'my dll name' was not found."
anybody knows how to solve this ?
@Vitor: Which version of AF SDK are you using on your development machine? Can you verify that your .dll file is copied within the C:\ProgramData\OSIsoft\AF\Plugins\<version of you assembly>?
Can you share more on how did you register your DR (plug-in) against the PI AF Server? Is it a 4.0 .Net Framework based .dll or 3.5?
You need to make sure your DR is register properly using RegPlugIn.exe. You can find the documentation from PI System Explorer help. Open up the AF reference document and do a search for RegPlugIn. There are also a few threads here that could help narrow down your issues. One item to look at is if you are using .Net 3.5. I have seen ProcessBook have issues with .Net 4.0/4.5 Framework.
Here is a YouTube video that could help also:
Hope this helps, good luck,