10 Replies Latest reply on Mar 4, 2013 3:10 PM by Schubert Randall

    Trouble with fillets

    Schubert Randall

      Can someone please help me troubleshoot these two macros?  One builds a unit cell of a truss and the other makes fillets.  If you run the code for the truss you’ll see it ignores the fillet code.  If you run the fillet macro on the truss it will normally ignore that too, but if you change the view just right it works.

       

      If you run the truss code then hit Ctrl+1 (front view) then hit the down arrow (rotate 15degrees) then run the fillet macro you’ll see it works on the edges facing the camera.  Then you can hit Ctrl+2 (back view) and the down arrow and run the fillet macro and it will do the back ones.  Any idea what’s going on here?

       

      Also this is my first macro so any advice on cleanup of the code would be greatly appreciated.  I know there's probably useless stuff in there.

        • Re: Trouble with fillets
          Artem Taturevych

          Try to avoid using the ModelDocExtension::SelectByID2 to select an entities by coordinates. This method is 'view' dependant it means that the selection may fail if the target entity is not in the view area. Try to use alternatives. Can you clarify what is this macro for? Probably it makes sense to use named entity or traverse the edges in order to find the required one.

          __________________________

          Regards,

          Artem Taturevych

          Application Engineer at Intercad

          http://intercad.com.au/

          Tel: +61 2 9454 4444

            • Re: Trouble with fillets
              Schubert Randall

              Thanks for your response.

               

              This macro is meant to build a  microtruss, fillet the nodes, then extract one unit cell.

               

              I will look into named entity and traversed edges.  I have the geometry worked out so I have 3D coordinates for each edge I want to fillet, but as you mentioned, it only works if I can see the fillet in the current view.