- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello everyone.
Probably I found a bug with the VBScript. I was creating and experimenting a lot with the VBScript function if-then-elseif-else statement and I found something that before saving my drawing was working, but know that I was checking again simply stop working.
I was linking multiple functions to the function name "NAME_BY_OBJECT" which generate a different name per each different object. In images 1 and 2, everything is correct...
... but something weird happens with I add the object type "Hanger":
... again everything works correct, but just with hangers, but I was checking the cable trays and cable trays fitting this happens:
I do not what happens here.
1) am I doing something bad? if yes, how can I fix this?
2) if not, What Is wrong, and what alternatives exist?
PD: attached files
If "[ObjectType]" = "Cable Tray" Then
RESULT = "[NAME_CABLE_TRAY]"
ElseIf "[ObjectType]" = "Cable Tray Fitting" Then
RESULT = "[NAME_CABLE_TRAY_FITTING]"
ElseIf "[ObjectType]" = "Hanger" Then
RESULT = "[NAME_HANGER]"
Else
RESULT = "NA"
End If
Solved! Go to Solution.