-
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 > General > Find & Replace > Reply To: Find & Replace

Since the names to change occur in many different locations, it is no easy task. The following example just handles object names, formula contents and datasets for 2d diagrams.
Option Explicit
Const csSearch As String = "Jan"
Const csReplace As String = "01"
Public Sub SearchReplace()
Visit ThisDatabase.RootFolder
End Sub
Private Sub Visit(ByRef oFld As Folder)
Dim cllObs As FpObjects
Set cllObs = oFld.Objects
Dim oObj As FpObject
For Each oObj In cllObs
Select Case oObj.ObjectType
Case fpObjectTypeFolder
Visit oObj
Case fpObjectTypeFormula
VisitFormula oObj
Case fpObjectType2DDiagram
VisitDiagram2D oObj
End Select
' rename object itself
Dim sNewName As String
sNewName = Replace(oObj.Name, csSearch, csReplace)
If sNewName oObj.Name Then
oObj.Rename sNewName, fpRenamingOptionsDontCorrectReferences
End If
Next oObj
End Sub
Private Sub VisitFormula(ByRef oFml As Formula)
oFml.Formula = Replace(oFml.Formula, csSearch, csReplace)
End Sub
Private Sub VisitDiagram2D(ByRef oDiag2D As Diagram2D)
Dim oCurve As Curve2D
For Each oCurve In oDiag2D.Curves
With oCurve.Data
.DataSet = Replace(.DataSet, csSearch, csReplace)
.XDataSet = Replace(.XDataSet, csSearch, csReplace)
End With
Next oCurve
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