Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

What is wrong with this code?

Status
Not open for further replies.

jtm2020hyo

Technical User
Dec 30, 2021
24
0
0
PE
I tried:

Code:
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


QAwnQOf_vymopm.png


... but do nothing, anyone could help me here?, not sure what is wrong here.

[A]=AAA
=NAME

WHEN B is a string "NAME", RETURN Should be equal to "AAA", if not, "" (empty)
 
Something like

Code:
[COLOR=blue]Select Case [B]
	Case "NAME"
		A1=[A]
	Case Else
		A1=""
End Select

RETURN=A1[/color]
 
Thanks for reply, this work but how should I use "Function" and "Sub"?
 
CAn't really tell you - this isn't really VbScript, it looks like an Autodesk formula definition, and not sure how that uses subs/functions. You'll have to check your Autodesk documentation.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top