7 Replies Latest reply on Aug 10, 2018 6:57 PM by David Charatan

    API Create Sweep Definition Always Returns Null

    David Charatan

      I'm making a C#-based add-in and trying to automatically create profile sweeps. Whenever I use my FeatureManager's CreateDefinition function, it returns null. I translated this help page's code to C# and it had the same problem. I have tried the CreateDefinition method with different input values, including the intended swFeatureNameID_e.swFmSweep and a for-loop-generated set of integers (0-19), but it always returns null. My profile and path were selected beforehand with SelectByID2 (I verified that they get selected in the GUI editor). I found this help page, which suggests selecting the path/profile with SelectByRay, but that's not possible in my case (I will be making dozens of sweeps that clutter the screen). Does anyone know how to get CreateDefinition to work? I tried manually creating a swept boss/base with my macro-generated path and profile and it worked perfectly; I simply want to automate doing so. Any help would be immensely appreciated.