I am looking to automate the procedure of cutting a standard-sized box for the passage of components thanks to a Macro.
My method would be to retrieve the intersection curves between these same components and the relevant face of the case to recover them and generate the extrusion specific to the cut of the case. Unfortunately, some of these components have threads, and I have the impression that the intersection curves feature in SolidWorks 2014 does not recognize this intersection. My macro currently retrieves a sketch created by the operator to execute the cut from the planes (middles) of the part. I thought I would report the problem by first executing a cut from a sketch, and finally using the recorder to be inspired by the code that would come out of it but I can't perform the operation even manually.
Thank you in advance for the help that the community will give me!
I didn't dig too deep on this side since the components change all the time, they are directly imported from the supplier's site in STEP format. There is therefore no point in setting them since it is almost certain that we will no longer use them.
Indeed, a fresh tutorial has just been made on this subject, on the other hand if the component can vary it can be complicated, maybe it is possible to replace this component before each insertion.
The idea I see to solve your problem is to have an empty part which is an intelligent component that will serve as a base because I imagine that the extrusion functions will always be a round or a square?
So you create a model with a sketch that you control by a dimension and then you insert your customer/supplier's part into your room
I think I'll see where you're going with this, I need to create an empty intelligent component without material with an associated function that I would modify (only the dimension that remains controlled). And to have the shape variable, I could create several with their associated shape specific to each component. That is to say a component with cylindrical extrusion, for another square, and rectangular.
And yes, that's right, the components will not have any other shape than these. What remains obscure to me is how to insert an imported component into the PART file of the one that will be called "smart".
I would like to remind you that my main goal is to restrict manual operations in order to limit the actions of the cartoonist. That's why I wanted to go through a Macro which, apparently, could not bring me a viable solution.
You can redefine the references (parts / function support, ...) of a smart component, you just have to right-click on your component in the tree and click on insert, then select the elements in your assembly window, so no need for a dimension.