Hello,
I'm working on a routine to find orphaned objects in .idw files. So far, I've found it relatively simple to find orphaned dimensions, balloons, surface texture symbols and centerlines/marks, but I'm having trouble with leaders (such as for tapped holes, etc.) and weld symbols.
I've tried iterating through a drawing's SketchedSymbols collection, but it seems that this collection always has zero size, and unlike the items I've been successful with so far, I cannot find a specific collection for those items either within the sheet or drawingview objects.
Any advice?
Thanks,
Kerry
Solved! Go to Solution.
Solved by mrattray. Go to Solution.
Have you tried using the HoleThreadNotes collection for hole and thread notes? There's also the LeaderNotes collection. I'm not sure how you could access weld notes, though. I've never had cause to.
Hello Mike,
How can I access the HoleThreadNotes collection? It looks like a HoleThreadNote is a type of dimension, but when I iterate through the unattached dimensions on a sheet, it doesn't come up. Maybe if I could access the collection directly it would be more helpful, but I don't see an obvious way to do this (it's not under the sheet or view objects). Same issue for the LeaderNotes collection.
Thanks,
Kerry
Thanks! This gets me so much closer.
Now if there were a way to iterate through weld symbols I'd be all set...
-Kerry
So there's not even a method to simply select the existing weld symbols so you could do somethng like delete them?
If not, seems like a glaring oversight. I can see not exposing the guts of the weld symbol, but not being able to select or more them.
Seeing your reply made me take another look - it turns out the weld symbols are accessible through the Sheet.DrawingNotes.GeneralNotes interface.
I did a little experimenting just now, and I don't see a way to distinguish between weld symbols and normal leader notes, nor do I see methods for accessing properties specific to weld symbols or any way to see if these general notes have a leader. I tried using the Type property and attribute sets, but the type is System._ComObject and the attribute sets are empty.
For my purposes, all I really need is a way to determine if the note has a leader and if the leader is attached to anything, but it would be nice to be able to differentiate between weld symbols and leader notes, too.
The general notes collections don't seem to include GDT symbols, either.
-Kerry
Well, this doesn't remove weld symbols
Dim oLN As DrawingNote For Each oLN In oSheet.DrawingNotes.LeaderNotes oLN.Delete Next
I'm building a tool to allow users to remove object types from drawings with a simple click. Wipe everything other than the views or pick a category(ies) to wipe.
I've been able to select everything and remove them except weld symbols. I can't seem to find a way to grab them. How were you able to get them selected?
That's almost literally what I already had 🙂
Dim oGN As DrawingNote For Each oGN In oSheet.DrawingNotes.GeneralNotes oGN.Delete Next
it strips off general text for me, but not weld symbols. I'll give a shot a dim'ing it as a generalnote instead.
You're right - it's not iterating the weld symbols. I swear I was able to iterate through them this morning, but for the life of me I cannot do it now
If I figure out what I did, I'll post an example, otherwise I'll assume I was still half asleep and didn't know what I was doing.
-Kerry
Can't find what you're looking for? Ask the community or share your knowledge.