I want a macro or vba code for highlighting circles which are not having centermarks.
OK but then what is the output you looking after highlighting the unmarked circles
Why not create a one that will add the center mark to every circle
I have some circles which are centermarked and some not centermarked.
I just wanted to highlight the circles which are not having centermark. I dont want to update the circles.
I have to first highlight the circles and then if user wishes to draw the centermark i will provide option for that. If no it will just highlight the circles. My first intension is to highlight the circles
@Raghu, check these examples in API help if they are of any help.
List Center Marks in Drawing Example (VB6)
Select All Center Marks Example (VB6)
@Jason, you may try this macro: Centermarks.swp 2
(Centermarks all circles found in a specific drawing view. REQUIRES DRAWING VIEW TO BE SELECTED FIRST, AND FACE ALSO TO BE SELECTED (SECOND)
Thanks Deepak, is this a link to an external site though? our Barracuda web filter is locked down very tight.
Anyway to post directly?
Jason attached is the file. For learning the API/macros, go through the examples/help provided in SolidWorks API help files. If possible try to have hands on the VB. Start creating/testing simple macros for yourself. Try looking/studying different macros codes which you will find on various SolidWorks forums including this one.
Thank you for your fast reply Deepak.
The centermark swp add the centermark only for the selected face in the selected view. Is there any way for selecting the face one by one automatically.
Feels it can be done done but I don't know HOW
Hello Deepak, just wondering if this can be done; we detail a lot of large tooling plates and it would
save us so much time to have a macro add the center marks. I don't know much about creating macros in SW, I have
basic training in C++ & Java but have never had success with macros. Any Ideas where could I go to learn how to do this? My company
is very cheap and not willing to train anybody
Hi Jason - Just jumping in on this. If you've got programing experience have a go at creating a macro in SldWks in the normal way, i.e. just start recording a macro to do something quite simple like creating a sketch line, then, when done, edit the macro (just look on the macro menu) and you'll be presented with a VB editor showing you the macro. This was the way I cracked doing stand-alone VB applications that interact with SldWks...
Thanks for the input Keith, I've spent days doing exactly what you said with simple macros but
I don't know or at least haven't had success on how to take it from working for the part is was created on to a generic macro that will work for anything.
Do you know if there are any books out there that specifically cover this topic?
Here's a link I just found...
and this looks useful...
The VB-work I've done with SldWks has been specific to one type of work I do, so haven't got the experience on more generic work. Depending on the quality of your VAR, there may be a route through them to get help. Also there are loads of examples (C & VB) on the Solidworks support web pages.
If you always want centermarks on circles on drawings, I think you can do that in your System Options. Go to Options > System Options > Drawings and check Display sketch arc centerpoints. I hope this helps.
You know what Glen....You are Right!
I guess it is a new feature in 2010? or maybe before that. We just upgraded to 2010 a few weeks back.
In 2006 It was an all or nothing option and put marks on every fillet as well as the holes. It looks like now
they have separated them out.
Thanks for pointing out the Obvious! now to change my templates.
Retrieving data ...