AnsweredAssumed Answered

How to Create a B-Spline Surface

Question asked by Tim Fromme on Jul 6, 2017
Latest reply on Jul 7, 2017 by Peter Brinkhuis



I have all the data necessary to create B-Spline Surfaces, however the API is not very clear to me with them.  There is CreateBSplineSurface, ICreateBSplineSurface, and ICreateBSplineSurfaceDLL which all seem to do the same thing.  I have tried a lot of different combinations of formatting the input to these functions, but I always seem to get an object variable not set error or a type mismatch error.  The first two functions ask for objects as input, and the last function asks for a long and three doubles, but the documentation and required input suggests that they should be arrays of some kind.  I have coding experience, but have not used VBA in forever.



I have since figured out why I was getting errors, it had to do with not instantiating the body as a new body in a part.  I am getting no more errors, however I crash solidworks every time that I try to run the macro, on the function call for CreateBSplineSurface or ICreateBSplineSurface.




I have been able to get this method working in C#, with separate issues that I feel are different enough to merit opening a different discussion on.

How to trim a closed surface?


Thanks in advance.