• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. Adams Car
  3. CMD problem from A/Car 2017 to A/Car 2018

Following Cadence Design Systems’ acquisition of the Design & Engineering (D&E) business, the D&E Community Forum on the Nexus Community Center has been migrated in the Cadence Physical System Simulation Community. For more details and if you have any questions, please refer to the FAQ.

Stats

  • State Not Answered
  • Replies 7
  • Subscribers 1
  • Views 9
  • Members are here 0
More Content

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

jpatterson
jpatterson over 7 years ago
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))
  • Sign in to reply
  • Cancel
  • greg.wheeler
    0 greg.wheeler over 7 years ago
    Hi Jim. I don't know why it would crash. Did you get a .dmp file on crash? That might help us debug the code.
    But anyway, the expression looks a little odd to my eyes... I'd write it like this:
     
    var set var=Analysis_Subsystem_Name object=(eval(Analysis_Name//"."//Model_Name[1].name))
     
    the ".name" is a built-in way to get any object's name (not including any of its parents).
     
    And in general, you only need one eval() function per expression.
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • jpatterson
    0 jpatterson over 7 years ago
    Hi Greg,
     
    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: ---------------------------------------------------------------------
     
    If I change it to your suggestion I get...
     
    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))
    ERROR: ---------------------------------------------------------------------
     
    Weird it doubles up on the "ERROR: Database object" line...
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • greg.wheeler
    0 greg.wheeler over 7 years ago
    Aha. Did you verify that object does exist with that name?
    Notice my expression generated the same name as yours, so that's good...
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • jpatterson
    0 jpatterson over 7 years ago
    Found the problem. I'm a bonehead! I had a typo in my subsystem name...Persevere
     
    Always fun to find my dumb mistakes in a big group! Sunglasses
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • MK202610123211
    0 MK202610123211 over 7 years ago
    Some useful 0.02$ :
    Check out the function
    subsystem_lookup(db_default(.system_defaults,"model"),"suspension","rear")
    that returns the desired subsystem object.
    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.
    I always create a full path/name like:
    library create library_name = .my_own_stuff
    var cre var = .my_own_stuff.my_unique_var
    If I'm lazy, I'm using existing libs like .acar:
    var cre var = .acar.my_unique_var
     
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
>
Cadence Guidelines

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2026 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information