Should be easy. As long as you can get the note that is linked to the row. If not then you will have to assume based on row note value and traverse through the notes on the sheet.
You will need to add <border> to the note.
I'm not at my desk but you can get the text format by changing it manually and right click edit text in window.
I'll post the text needed to make it appear correctly monday
Thank you Jacob. I know how this is done manually!! But the point is to do it automatically.Lets say we have a 125 different holes on a plate and want to specify all of those 36 holes that have a thread and for those Tags change or add the border text or else just to find those holes easy.Doing this manually is a time consuming work and that is the point of doing this more automatically and faster.
You misunderstood. I am saying automation. If your doing something more than once it should be automated.
I have done similar things. This is actually going to be a very simple task.(maybe)
I said manually do it to know what text to add to the callouts. Meaning do this one time to get the format so it can be added to the macro
Will be something like <border ="1to13"> CurrentNoteText<border/>
So you will have to wrap the current text with a formatted text.
Unless they are actually balloons then it's simpler. I can't find out until Monday morning.
Sorry for misunderstanding.Ok, waiting for Monday reply.It's OK if the specified text has a triangle balloon and all the rest are without balloon.
ok so here is the deal.
there is a lot of extra code needed to ensure that this will work for you. i can provide you the steps needed to achieve this task but i cannot write it for you.
the Holetable note on the sheet is a special controlled note. it Does however have border capabilities built in so that makes it a little easier
Start with Drawing Model
Traverse All Sheets using
Traverse all sheet views using 2018 SOLIDWORKS API Help - GetFirstView Method (IDrawingDoc)
for each view you need to get each note
for each note its hard to guarantee that it is actually a hole table annotation. one way is to check the INote.PropertyLinkedText. it should be in the format of your hole table. like A2 , D2 ect
if it is determined to be a hole table driven note then continue evaluation
get the notes annotation using 2018 SOLIDWORKS API Help - GetAnnotation Method (INote)
each note annotation will supply the linked Entities using 2018 SOLIDWORKS API Help - GetAttachedEntities3 Method (IAnnotation)
each entity will generally be an edge, each edge has one or 2 features linked to it.
use 2018 SOLIDWORKS API Help - GetTwoAdjacentFaces2 Method (IEdge) to access both faces.
then get both features. if both features are the same then its a given that you have the feature you want.
if one of the faces is planar then its NOT that one. generally it will be a Cone or cylinder face.
once you have your feature you can then determine if it is a tapped hole.
to do this you call
2018 SOLIDWORKS API Help - GetTypeName2 Method (IFeature)
if returns "AdvHoleWzd"
if returns "LibraryFeature"
basically loop through all subfeatures. and check them.
if returns "HoleWzd" then
evaluate the 2018 SOLIDWORKS API Help - IWizardHoleFeatureData2 Interface if something else determine if it is necessary to check.
if it is a tapped hole you can then add the border using
if this is too complex then i would suggest contacting Keith Rice at CAD Sharp to implement it for you.
i would recommend trying to follow these steps to do it yourself.
You can have threads have a triangle. Holes have a circle, counterbores have a rectangle, heck even combinations of them all if the actual hole note is an annotation or display dimension.
OK you have a point and this is a good idea but how do you select different holes? Separately manually because if you select a face how the systems selects different type of holes?The templates are no problem but the selection is or not?
Yes, I select the holes manually, one by one!!
This is what I want to avoid. Computers are made to make life easier:). Or better to have more time to do other work:(
You can avoid this by selecting all the holes, creating a single table, then splitting that table after each group.
this could also be easily automated using the view edges, getting the cylinder faces from each edge, determining the cylinder faces feature type and using 2018 SOLIDWORKS API Help - AddHole Method (IHoleTable)
the hard part is going to be to determine which table each annotation belongs to. there is a semi reliable way. each annotation name has somewhat of a relationship to the HoleTables Iannotation. the HoleTables IAnnotation name is DetailItemSomeNumber so if its DetailItem377 then anything less than 377 belongs to that table so DetailItem376 is driven by this table.
however of course its not so easy.
if there are 5 hole tables then this is how it works
DetailItem306 (has anything less than 305 probably starts at 300 it seems)
DetailItem330 (has DetailItem307 To DetailItem329)
DetailItem369 (has DetailItem331 To DetailItem387)
DetailItem388 (has DetailItem370 To DetailItem387)
DetailItem399 (has DetailItem389 To DetailItem398)
only when created. i'm sure it gets messed up as holes are added after another table has been added
These are some great information and also deep and good step by step explanation of how to process this issue.It look very promising. I will certainly give it a try. Maybe beginning more simple way just with one table and maybe one type of hole to get the point and then add some things.The point is just to select a certain type of holes (e.g. those with thread) and change the type of note on the drawing View. I might try mixing the lookup for notes in a View and compare these notes with the in advance selected ones.
No need to wrote the hole code for me than you take off the fun part of work:). You have done a great job already.I will be back probably with some more questions regarding this issue.Hope I will find some time this week to write the code.
Thank you very much again for all the information.