hexagon logo

CMD problem from A/Car 2017 to A/Car 2018

I have a cmd file I've used for many years to extract info about my A/Car suspension assemblies. It seems to be crashing now on the last line below in A/Car 2018 and I can't see why. Any thoughts...???
 
defaults function_references show_as = partial_name
!
!------------------------------------------------------------------------------------------------------------
!>>>>>> Capture model, analysis, and subsystem names...
!
var set var=Model_Name object=(eval(db_default(.system_defaults,"model")))
var set var=Analysis_Name object=(eval(db_default(.system_defaults,"analysis")))
var set var=Subsystem_Name string_value=(str_substr(eval(Model_Name.object_value[1]),1,(str_length(eval(Model_Name.object_value[1]))-1)))
var set var=Analysis_Subsystem_Name object=(eval(Analysis_Name.object_value)//eval(Subsystem_Name.string_value))
Parents
  • Aaaand another last proposal:
     
    It seems you prefer command files, but using macros makes the syntax soooo much easier.
    For your case you could use
    !$Model_Name:t=model:A
    !$Analysis_Name:t=analysis:A
     
    The :A makes the according $ variable holding the system default for the type, thus you don't need to call the macro with model_name = xxx.
    Basically the macro replaces all occurrences of the $xxx with the string that was fed to the macro (or which is default).
     
    In the macro you'd refer everything like
    var set var = $_self.Analysis_Subsystem_Name string = (eval("$'Analysis_Name'." // subsystem_lookup($Model_Name,"suspension","rear").name ))
     
Reply
  • Aaaand another last proposal:
     
    It seems you prefer command files, but using macros makes the syntax soooo much easier.
    For your case you could use
    !$Model_Name:t=model:A
    !$Analysis_Name:t=analysis:A
     
    The :A makes the according $ variable holding the system default for the type, thus you don't need to call the macro with model_name = xxx.
    Basically the macro replaces all occurrences of the $xxx with the string that was fed to the macro (or which is default).
     
    In the macro you'd refer everything like
    var set var = $_self.Analysis_Subsystem_Name string = (eval("$'Analysis_Name'." // subsystem_lookup($Model_Name,"suspension","rear").name ))
     
Children
No Data