[Question] InStr Funktion ohne Excel (Finden())

Balises:

gibt es eine Möglichkeit VB-Funktion "InString" in den variablen Textbildern einzubauen, aber ohne Excel?
Irgendeine Alternative, .vbs?

lg
Milan

If you install visual studio 2019 and follow the step by step tutorial made by Allplan to create an RDLC project editor.
You can then insert your report that you wish to edit, and use the functions provided there.

Not sure if this answers your question.

If you could give more info about the issue, maybe I could help you more

Pièces-jointes (1)

Type: image/png
Téléchargé 52 fois
Size: 24,62 KiB

Es gibt ein vbs-script, dessen funktionen man in variablen Textbildern benutzen kann.
Das liegt im Verzeichnis <AllplanDir>\Std\vbs und heisst function.vbs

Wenn man diese Datei mit einem Text-Editor öffnet, sieht man als Beispiel die Funktion "block", die
sogar die InStr-Funktione benutzt:

Function block(liste)
       blanc = InStr(1,liste," ")
	   
	   If blanc > 1 Then
          block = Mid(liste,1,blanc) + vbCr + Mid(liste,blanc+1,Len(liste))
	   Else
          block = liste
       End If		  
End Function

Weitere Hinweise und Funktionen gibts hier

danke an euch beide,
@Nemo, so etwas habe ich zwar gemeint aber sorry, ich komme mit dieser Funktion leider nicht klar. Wofür wird sie verwendet? was ist "liste"? Blanc, block?
Gibt es irgendwo eine Spezifikation der Variablen für Allplan? Keine der Funktionen in der Datei kann ich erkennen.

lg
m

Es ist eine programmierte Funktion in vbs.
Alle Worte mit grossen Anfangsbuchstaben sind Schlüsselwörter, alles andere Variablen und Konstanten:

Function block(liste)
blanc = InStr(1,liste," ")

If blanc > 1 Then
block = Mid(liste,1,blanc) + vbCr + Mid(liste,blanc+1,Len(liste))
Else
block = liste
End If
End Function

siehe Syntax VBS


https://campus.allplan.com/ utilise des cookies  -  Plus d'informations

Accepter