Forum Discussion

MarkMeader's avatar
MarkMeader
New Contributor III
2 years ago

Workspace assemblies - Call functions from another file within the same assembly

Hi I'm trying to find out the correct way to reference a function in another Workspace assemblies file. For example say i have: 1) XFBR business rule assembly file (ParamHelper.Vb) 2) Dashboard E...
  • ChristianW's avatar
    2 years ago

    In version 8, most of the business rules will be located in the same namespace

    Namespace Workspace.__WsNamespacePrefix.__WsAssemblyName

    So to access classes within this namespace, just add

    Imports Workspace.__WsNamespacePrefix.__WsAssemblyName

    to the business rules / files that are not in this namespace

    For example:

    ...
    Imports Workspace.__WsNamespacePrefix.__WsAssemblyName
    
    Namespace Workspace.__WsNamespacePrefix.__WsAssemblyName.BusinessRule.DashboardExtender.SolutionHelper
    	Public Class MainClass
    ...

    This works as well in 7.4.x

    So for all files, that are not of dashboard data set, dashboard extender, dashboard xfbr sting or Spreadsheet, business rules equivalent use this namespace.

  • JackLacava's avatar
    JackLacava
    2 years ago

    To save a bit of typing, one can import the whole namespace. For example, assuming you have a class "SomeCustomClass" defined in a DDS called "MyBR":

    Imports Workspace.__WsNamespacePrefix.__WsAssemblyName.BusinessRule.DashboardDataSet.MyBR
    
    ...
    
    Dim myObj as SomeCustomClass = new SomeCustomClass