Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Sebastian Skejø
    @sebastianskejoe
    Hi. I think that setting the Data-field of an AnyFunInterpol throught the SetValue-macro, might not be working. I seem to be getting different results depending on what value I set in the .any-file eventhough (I think) this value should be overridden by the python-script. Is this a known issue or am I doing something wrong?
    Sebastian Skejø
    @sebastianskejoe
    Here are three different file settings:
    http://pasteall.org/pic/show.php?id=119069
    http://pasteall.org/pic/show.php?id=119070
    http://pasteall.org/pic/show.php?id=119071
    The dashed line is the .any-file run without changing the Data value and the solid lines are the results when setting the value through SetValue. As you can see, solid line of the values corresponding to the file values, does follow the dashed line as expected, but the remaining two solid lines are different from picture to picture, indicating that the original file values in some way affect the results when using SetValue (which they should not).
    Morten Enemark Lund
    @melund
    Hi @sebastianskejoe. Thanks for reporting this. It is easy to check if there is a problem. Just try to set the value then dump it again. If you don't get the modified value then there is a problem.
    You can also try to change the value directly in AnyBody GUI. Just find value in the model tree, right click and select "set value". My guess is that AnyBody thinks the Data variable is a constant, and won't allow you to change it.
    Morten Enemark Lund
    @melund
    That is usually fixable. We you set the variable in AnyScript do: Data = DesignVar({{......}});
    That will force AnyBody to consider the variable as not a constant. Hope it helps. Otherwise, please open a issue on GitHub
    Sebastian Skejø
    @sebastianskejoe
    The values in the legend are the dumped values of Data, so it they should definitely be changed. Changing the declaration to a DesignVar, does not change it. Will open an issue :)
    Sebastian Skejø
    @sebastianskejoe

    Hi again.

    I'm trying to batch process a large number of files in the following way:

    trials = os.listdir(path)
    macrolist = []
    for trial in trials:
        mc = [
            Load(path+trial),
            OperationRun('Main.RunApplication')
        ]
    
        macrolist.append(mc)
    
    app.start_macro(macrolist)

    When I run the script all macros results in errors and I get the following error file:

    ########### MACRO #############
    load "<PATH_IS_HERE>"
    operation Main.RunApplication
    run
    
    ######### OUTPUT LOG ##########

    However, if I put line 2-4 in it's own file and run that file from the AnyBody Console, it processes it just fine. Any ideas why?

    Sebastian Skejø
    @sebastianskejoe
    Fixed it. For some reason the path to the anybody console was empty in the registry, so I fixed it by providing anybodycon_path in AnyPyProcess. Pretty sure that this happened as part of an upgrade to AnyBody 7.1, but not sure whether it's just my install. Any way, will open an issue to propose checking if the file actually exists.