1 Reply Latest reply on Sep 22, 2016 7:47 PM by Keith Rice

    Reattach balloon using API

    Jeetendra Prasad

      Hi All,

       

      We have tons of assemblies which contains weldment structure.

      Our users are now changing missing weldment profiles from earlier missing location to new locations (sldlfp file names are same). By doing that changes, the sketch profile needs to be manually corrected which they are doing. ANd so original faces/edges/etc are replaced and hence balloon becomes dangling in drawing. I want to remove these dangling balloons by finding balloons and their leader point locations in the original drawing and related assembly. And in new drawing if any balloon with same id is there which is dangling then I want to attach it to whatever face/edge found at original leader point.

       

      Can this be a valid point and this be done. Any pointers will be great.

       

      Regards,

      Jeetendra Prasad

        • Re: Reattach balloon using API
          Keith Rice

          Please clarify:

           

          • Are these SLDLFP files different library features, but with the same name, or are they truly the same library feature but in a different location? If the latter, I don't understand why you are editing the sketch since nothing should be different in the geometry.
          • Why you would have working assembly and drawing files with the original weldment profiles if those weldment profile locations changed. It seems like all you would have to work with are drawings with dangling balloons.

           

          Depending on your answers to the above, there are a few options for locating the correct entity to re-attach a balloon to:

           

          1. Persistent ID's --- if you are using the same SLDLFP.
          2. Geometry / topology traversal until you find an entity that matches the original -- if you can see the original geometry but persistent ID's don't match between the old and new.
          3. Closest entity to balloon leader --- if you can't use 1 or 2. This could be messy. While it is possible to get the location of the leader start point, it could be difficult to know for certain whether it is supposed to be attached to a face, edge, or vertex. You could arbitrarily say that if the leader is within X distance of an edge, re-attach to that edge, I suppose. If the rules are clearly defined, however, then this would like run much faster than 1 and 2 because in 1 and 2 you'd need to open up those original models.

           

          All in all, if I'm understanding your situation correct (and I'm not sure that I am), this could be a complex program.

           

          Keith

          SolidWorks API Training and Services