hexagon logo

How to delete atire wheel/road using cmd-script

Is there a possibility to delete atire wheel_tire/road elements unsing CMD-script? I can only find the comands to create and modifiy atire objects but no comand to delete those objects.
  • Not sure what the answer is, but here is how I would find out:
    • Have a model with the elements in it.
    • Open the log-file (it is in your working directory)
    • Do the delete in the interface
    • Look at the log-file to see what was added. From the added content you should be able to deduct what commands to use
  • I tried out, what you suggested, but the log file before and after deleting the tire/road are the same. It seems to be a hidden command.
    I attached the log files and the small test model

    Attached Files (1)
  • Maybe you did not reload the log-file into your editor after doing the delete.
    What I get is this when I do RMB-delete on the tire in your model:
     
    group modify group=SELECT_LIST obj=.mVA_3L.test_tire expand_groups=no
    mdi delete_macro
     
    So it puts the tire into the SELECT_LIST group and use the generic "mdi delete_macro" command.
     
    What you also can do is to simply use:
     
    entity delete entity_name = .mVA_3L.test_tire
  • Thanks for the fast reply.
    It's kind of funny, when I do exactly what you suggested (RMB->Delete) the Tires are removed from my model, but no commands appear un my command window/log-file.
    When I use the two lines you posted in a cmd script they actually do what they should. They remove the tire from the model.
    Unfortunately, when I do the same thing with the road I get a warning that the road has dependents, which also have to be deleted (see attachment). When I select “delete all” the road is still there but would not work anymore. I also tried to delete those objects first (marker and joint), resulting in a message, that the objects belong to an assembly and can’t be deleted.
    Is there a possibility of deleting the whole road assembly via script?
  • I prefer the command
    entity delete entity= <List of valid ADAMS objects>
     
    In some cases you need to put it in an undo like
    undo begin
    entity delete entity= <List of valid ADAMS objects>
    undo end
    (this is especially helpful when deleting stuff that's dependent on each other)
     
    When you describe "the road is still there but would not work anymore": What did you want to do ?
    I mean, if you delete tires and road, you didn't seriously expected the model to still work, did you ?
     
  • Thanks, that solves my Problem.
    To delete the Road It seams to be important to delete the road first and afterwards the ref-marker, like this:
    entity delete entity = test_road, test_road_ref_1