-
FlexPro
- At a Glance
- Features & Options
- Applications
- All Advantages
- What’s New in FlexPro 2021
- Try FlexPro For Free
- FlexPro View OEM Freeware
- Buying Guide
- Login
- Language
-
-
-
- +49 6894 929600
- infoweisang.com
- Google Maps
- Products
- News
- Support
- Company
- Contact
- Login
- Language
-
-
-
- +49 6894 929600
- infoweisang.com
- Google Maps
Home > Community > Automation and VBA > Apply function to a data folder > Reply To: Apply function to a data folder

There is a manual way to achieve this. Place your function formula (starting with Arguments … and named e.g. _RMS) in the folder and drag the signals onto that formula. This creates for each signal a new formula containing the application of the function on the signal.
Using Automation this small code sample performs the same task:
Option Explicit
Const FunctionPath As String = "\RMS_func"
Const FunctionPrefix As String = "_RMS"
Public Sub ApplyFunction()
Dim fldSignals As Folder
Set fldSignals = ActiveDatabase.ActiveFolder
Dim cllSignals As FpObjects
Set cllSignals = fldSignals.Objects(fpObjectTypeDataSet)
Dim dsSignal As DataSet
Dim fmlApplSignal As Formula
For Each dsSignal In cllSignals
Set fmlApplSignal = fldSignals.Add(dsSignal.Name & FunctionPrefix, fpObjectTypeFormula)
With fmlApplSignal
.Author = "Macro ApplyFunction()"
.Formula = FunctionPath & "(" & dsSignal.Name & ")" & vbCrLf
.ReadOnly = True
End With
Next
End Sub
You are currently viewing a placeholder content from Facebook. To access the actual content, click the button below. Please note that doing so will share data with third-party providers.
More InformationYou need to load content from reCAPTCHA to submit the form. Please note that doing so will share data with third-party providers.
More InformationYou are currently viewing a placeholder content from Instagram. To access the actual content, click the button below. Please note that doing so will share data with third-party providers.
More InformationYou are currently viewing a placeholder content from X. To access the actual content, click the button below. Please note that doing so will share data with third-party providers.
More Information