jntm226 Posted May 24, 2020 Share Posted May 24, 2020 (edited) 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 generates 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. Then: 1) am I doing something bad? 2)if yes, how can I fix this? 3) if not, What Is wrong, and what alternatives exist? PD: attached files before: If "[ObjectType]" = "Cable Tray" Then RESULT = "[NAME_CABLE_TRAY]" ElseIf "[ObjectType]" = "Cable Tray Fitting" Then RESULT = "[NAME_CABLE_TRAY_FITTING]" Else RESULT = "NA" End If after: 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 property bug with hanger added.dwg property bug.dwg Edited May 24, 2020 by jntm226 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.