Hi iam new to PCDMIS but not to programming . i have the problem that i have to calculate a few hundred measurement points from before measured dimensionpoints in a Basic Script ...
Looking now for the easiest way to get all the before measured Variablevalues (more than 30 Variables) to the Subroutine for this calculations...
Does anyone know the max number of arguments for the Script Command ... sorry german language version
S2 =SKRIPT/DATEINAME= C:\TRAINING\SKRIPT1.BAS FUNKTION/ShowVars,EINBLENDEN=JA,ARG1=USER,ARG2=FIELDSZV,ARG3=PRO,, or would it be handier if i use getVariables ...???? Dim App AsObjectSet App = CreateObject ("PCDLRN.Application") Dim Part AsObjectSet Part = App.ActivePartProgram Dim Var AsObjectSet Var = Part.GetVariableValue ("V1") but than i have the question how i get the result from a measured point (like pkt2.x.meas) thanks in advance for any hints! eric
Thanks i did it now with a temp file !
which i parse for the Variables...
Thats less code in Basic.....
'---------------------------------------------------------------------
' ParseStr
' Purpose: Extract next part of a separated string
' Inputs: lStart: start position
' sSrc: source string
' sSeparator: string between the different parts
' Return: String part
' Example: sSrc = "111, 222, 333": lStart = 1
' sNextPart = CG.ParseStr(lStart, sSrc, ",")
' sNextPart = CG.ParseStr(lStart, sSrc, ",")
' sNextPart = CG.ParseStr(lStart, sSrc, ",")
' -> ParseStr returns "111", " 222" and " 333"
'---------------------------------------------------------------------
Public Function ParseStr( _
ByRef Lstart As Long, _
ByVal sSrc As String, _
ByVal sSeparator As String) _
As String
Dim lPos As Long
lPos = InStr(Lstart, sSrc, sSeparator)
If lPos = 0 Then
'No separator found, return rest of string
ParseStr = Mid$(sSrc, Lstart)
Lstart = Len(sSrc) + 1
Else
'Return string, skip separator
ParseStr = Mid$(sSrc, Lstart, lPos - Lstart)
Lstart = lPos + Len(sSeparator)
End If
Thanks i did it now with a temp file !
which i parse for the Variables...
Thats less code in Basic.....
'---------------------------------------------------------------------
' ParseStr
' Purpose: Extract next part of a separated string
' Inputs: lStart: start position
' sSrc: source string
' sSeparator: string between the different parts
' Return: String part
' Example: sSrc = "111, 222, 333": lStart = 1
' sNextPart = CG.ParseStr(lStart, sSrc, ",")
' sNextPart = CG.ParseStr(lStart, sSrc, ",")
' sNextPart = CG.ParseStr(lStart, sSrc, ",")
' -> ParseStr returns "111", " 222" and " 333"
'---------------------------------------------------------------------
Public Function ParseStr( _
ByRef Lstart As Long, _
ByVal sSrc As String, _
ByVal sSeparator As String) _
As String
Dim lPos As Long
lPos = InStr(Lstart, sSrc, sSeparator)
If lPos = 0 Then
'No separator found, return rest of string
ParseStr = Mid$(sSrc, Lstart)
Lstart = Len(sSrc) + 1
Else
'Return string, skip separator
ParseStr = Mid$(sSrc, Lstart, lPos - Lstart)
Lstart = lPos + Len(sSeparator)
End If