Hi,
I am planning to make a macro to dimension multiple different files that has cutouts with more than one shapes. I just want it to dimension the midpoint of the feature to the edges. The attached picture is an example. imagine a door knob with screw holes. I jsut want to dimension where the middle of the knob will be at from the edges, not the screw holes etc. How can i do that with macros? I am new to it so can you please give me example macros and help files. Thanks.
SolidworksApi macros
Have you tried recording a macro and check if that works?
yup i tried. but since the location of the cutouts varies part by part... its hard. I have over 300 different parts that are similar but the location of the cutouts varies. the cutout is a library feature,
If your parts are similar, you could use an external Design table instead to drive your cutout and insert your design table in your different parts?
One way could be to select the feature by name in the view and then insert model items for selected feature.
The workflow could be:
Do you have any pictures as a guide. Im still new to macros. Thanks
I assume you're talking about adding these dimensions in a drawing. But I can't tell whether you're importing existing dimensions or adding a custom smart dimension. If the former then I think Deepak's method would work. If the latter then this would be a serious undertaking, probably not one that is worth trying to program yourself if you're new to API.
Keith
SolidWorks API Training & Services
I think its the latter one... so the method I went with was make a template drawing of one of the design... When i want the other drawings done, I save the drawing and reference part as another name and edit the part. When I do that, the whole drawing is changed.
Another questions i have now is, I have a change i need to do to all these drawings i've done in the past few weeks. It's all similar and the change is all the same, (ie all are same holes in the same locations) is there a way i can make a macro to dimension these new holes on the old drawings. The problem is that since the drawings were done manually, the location of the parts and scale of the parts in each drawing is slightly different. Can anyone please advise?
Thanks,