Enhance Tag All - Simplified version

Поделиться
HTML-код
  • Опубликовано: 15 дек 2024

Комментарии • 4

  • @scottmichaud9454
    @scottmichaud9454 3 года назад

    Great video @Dynamo SBSS! Thanks for sharing! Out of curiosity, because I've noticed many people on the forums, when it comes to using python vs Design Scripts for if Else Statements. Do you stick with python just because your comfortable with it and don't feel like there is much of a run time difference in converting the inputs/outputs to and from python? I'm going to try it both ways and see if there is an improvements one way or the other on larger views because you have me curious. Example: Delete Element Logic would be
    CheckDeleteBoolen;
    ListofElem;
    deletecheck = [Imperative]
    {
    DeleteList =[];
    if(CheckDeleteBoolen == true)
    {DeleteList = ListofElem;
    }
    else{DeleteList = [];
    }
    return = DSCore.List.Flatten(DeleteList);
    };
    and get Category could be
    inp;
    CategoryIf = [Imperative]
    {a=[];
    if(inp == "Duct Tags")
    {a = Category.ByName("Ducts");
    }
    elseif(inp== "Pipe Tags")
    {a = Category.ByName("Pipes");
    }
    elseif(inp== "Conduit Tags")
    {a = Category.ByName("Conduits");
    }
    else
    {a = Category.ByName("Cable Trays");
    }
    return=a;
    };

    • @dynamo_scripts
      @dynamo_scripts  3 года назад

      Hello Scott, thank you for your comment. I use python If else statement because python can easily handle when you deliver from one side (when true) X number of elements and from the other side (when it is false) some other number of elements. I'm not sure how good was my explanation but I did not think about your point. I'm not sure which one is faster, I would say that the design script should win. I will also put it on the test and let you know. Best Regards, Nenad

  • @william_78
    @william_78 3 года назад +1

    Thank you for sharing your knowledge! Is there a way to identify when one tag overlaps another and offset it?

    • @dynamo_scripts
      @dynamo_scripts  3 года назад +1

      You can easily detect intersection of tags but there is a problem with offset of the tag. You can offset the tag in some direction in order to avoid current intersection but then you can create a new "clash" with some other tag so until we find some way to involve AI in order to be aware or all elements there will not be some magical solution.