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?
Hello, I found a nice formula to manage arrays, but I do not have idea why this do not work with 0D arrays (unique cell) and 1D arrays (rows or columns), but this work correctly with 2D arrays.
for example, when I use this =JTM2dSplit(IFERROR(FILTER(M53:N60;L53:L60=1);"");";";";"), this return...
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...
Convert String to Array then do basic operations:
StringSource= (A1,B2,C1; A2,B2,C1; A3,B2,C2; A4,B2,C2;A5,B2,C3; A6,B2,C4; A7,B2,C5;)
to
2DArray = {A1,B1,C1; A2,B2,C2; A3,B3,C3; A4,B4,C4 ; A5,B5,C5; A6,B6,C6; A7,B7,C7}
using Split "," For Axis-X and ";" for Axis-Y and not sure that more...
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...
I mean this:
ArrSource = "A1,B2,C1;A2,B2,C1;A3,B2,C2;A4,B2,C2;A5,B2,C3;A6,B2,C4;A7,B2,C5"
ArrSource1 = Split(ArrSource , ";")
ArrSource2 = Split(ArrSource1(0) , ",")
wscript.echo(ArrSource2(2)) 'result in "C1", here all values with variable(2) are the third index
Also,I think is need...
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.