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...???
Sorry, that was poorly worded. By "crash" I meant I get an error on that line. If I run it as I always have I get...
ERROR: ---------------------------------------------------------------------ERROR: Error detected on line number 9, character 112 of aaa.cmd.
ERROR: Database object ".D27150_310_43pt5_77pt5_14RH_8HH_VS_C21800.SPD12210__Static_Load_Wheel_Center_Height.D27150_310_43pt5_77pt5_14RH_8HH_VS_C21800" does not exist
ERROR: The command was not executed.
ERROR: >> var set var=Analysis_Subsystem_Name object=(eval(Analysis_Name.object_value)//eval(Subsystem_Name.string_value))
ERROR: ---------------------------------------------------------------------ERROR: Error detected on line number 9, character 89 of aaa.cmd.
ERROR: Database object ".D27150_310_43pt5_77pt5_14RH_8HH_VS_C21800.SPD12210__Static_Load_Wheel_Center_Height.D27150_310_43pt5_77pt5_14RH_8HH_VS_C21800" does not exist
ERROR: Database object ".D27150_310_43pt5_77pt5_14RH_8HH_VS_C21800.SPD12210__Static_Load_Wheel_Center_Height.D27150_310_43pt5_77pt5_14RH_8HH_VS_C21800" does not exist
ERROR: The command was not executed.
ERROR: >> var set var=Analysis_Subsystem_Name object=(eval(Analysis_Name//"."//Model_Name[1].name))
Usually much more elegant than building strings ....
And another one:
var set var=xxx can turn out ambiguous. It creates the variable under the default library/model and if you do that multiple times within a session, it's likely to create a var with the same name under different locations which will throw an error.
As usual, your $0.02 (and Greg's!) are very helpful.
I'll give that "subsystem_lookup" a try.
I have occasionally been getting complaints from ADAMS about a variable existing in more than one place, so I like your suggestion about that, too.
And you're right, I'm absolutely bogged down in my old ways using cmd files. This isn't the first (or last! ) time you've reminded me of the superiority of macros. Old dog...