I tried:
Dim Tag_List
Function DefineTag(Tag_List)
Select Case Tag_List
Case "NAME"
A1 = [B]
Case Else
A1 = ""
End Select
End Function
DefineTag([A])
RETURN = A1
... but do nothing, anyone could help me here?, not sure what is wrong here.
[A]=AAA
[B]=NAME
WHEN B is a string "NAME"...
Thanks for the help, until I understand, this VBA script only manages 2D arrays, but contain code to manage 0D and 1D arrays management...
... Then the solution is change "cellValues As Variant" to anything that accept 0D, 1D, 2D arrays, how do this change?
...' Redim the ResultArray to the appropriate size
Dim ResultArray() As Variant
ReDim ResultArray(1 To (UBound(cellValues, 1) * (MaxLengths(2) + 1)), 1 To (UBound(cellValues, 2) * (MaxLengths(1) + 1)))
' Populate the ResultArray with the split values
ResultArray =...
AutoCAD have a PLOT command, this command put the TAG-OBJECT than contain the VBS with "RETURN = ABC-123" to pdf, and I am not sure why happen this issue only here.
Also Cstr(ABC-123) should work or maybe I did anything wrong.
Any suggestion? Or is there another command to convert a Formula to...
I tried every character in :
https://www.vbsedit.com/html/c60e2712-20e6-40f2-8fe2-cfb74ca6bca1.asp
just 28, 29, (I already do not remember if 30) works, other character convert "ABC-123" in number Integer and leave "0.000"
probably "ABC-123" mean variable "ABC" minus (-) value "123"
edit...
I found an in solvable issue, I use AutoCAD MEP and this support VBS v3.0 if I remember correctly, everything work good but ...
... When I try convert create a tag for my object like "ABC-123", VBS read this like a formula, and I already tried everything in the internet to convert this...
I found a function ().push in JavaScript to add elements to array.
Is there any equivalent in VBScript to add elements to Array too simple like ().push?
Thanks a lot.
I will check it.
Actually I use VBS/VBA in AutoCAD MEP, and not sure if there exist any VBS book for this task(related to AutoCAD and Mechanical, Electrical, Plumbing design).
... I am interested mainly in Arrays, anything like combine 1D, 2D, 3D arrays, with those arrays do...
...using Split "," For Axis-X and ";" for Axis-Y and not sure that more do.
how can I do arithmetic operations 2DArray like this :
((2DArray(0)(0)*2DArray(0)(1))/2DArray(0)(2))+((2DArray(1)(0)*2DArray(1)(1))/2DArray(1)(2))+ ((2DArray(3)(0)*2DArray(3)(1))/2DArray(3)(2))+ ... etc
where:
if...
Thank a lot to everyone. I finally solved this
Was necessary modify a bit to be used in AutoCAD MEP, there the software always request finish with a "RESULT =".
Also I received s bit of help here...
Works perfectly, thanks a lot.
... but how could I output the string concatenation of the array that contain the unique/repeated value of all index with the shape of "variable(n)(2)" in my arrSplitStrings2 array 2D? something like this:
ArrSource = "A1,B2,C1; A2,B2,C1; A3,B2,C2...
thanks for the fast reply.
what I was searching is a 2D array like this:
https://forums.autodesk.com/t5/vba/count-repeated-unique-strings-values/m-p/10851492#M105864
here is the VBA code used:
Sub SplitArrSource()
ArrSource = "A1,B2,C1; A2,B2,C1; A3,B2,C2; A4,B2,C2;A5,B2,C3; A6,B2,C4...
...if possible or if just can be possible create variable manually writing to have all values indexed:
https://stackoverflow.com/questions/53660929/how-to-dynamically-name-vbscript-variables-inside-for-loop
'hypothetical
for i = i to some_number
dim "prefix" & i
"prefix" & i = 2 * i
next
Awesome code, works perfectly. I tried edit de code to replace the C1,C2,C3,etc... to use any value but your code is very advanced for me.
I would greatly appreciate your help if help me to edit the code to count and list unique values in the third index after each semicolon (";")?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.