iLogic Needed: Remove Extension Lines - IDW Center Marks

iLogic Needed: Remove Extension Lines - IDW Center Marks

janelson33
Collaborator Collaborator
478 Views
2 Replies
Message 1 of 3

iLogic Needed: Remove Extension Lines - IDW Center Marks

janelson33
Collaborator
Collaborator

The amount of potential that IS coded into Inventor, but IS NOT easy to find/use befuddles me to the far corners of the universe.

 

I copied someone's iLogic to add center marks on my IDW drawing view and solved a problem that took WAY too much time for no reason. (I have 99 parts in a laser jig.)

 

Now I cannot eradicate the extension lines on these center marks all at once.

  • There is no option to disable in Styles Manager, but yet there is if we right click a center mark.........
  • However, trying to batch select using Control or Shift keys DOES NOT WORK:
    • Only the first-selected center mark has its extension lines removed: MADDENING!!!
    • I hate this software so much: Why does batch selection work for dimensions if I want to change precision, but not for center mark extension lines??

This is surely achievable right?

janelson33_0-1684958368623.png

 

There is no power but what the people allow you to take.
0 Likes
479 Views
2 Replies
Replies (2)
Message 2 of 3

pcrawley
Advisor
Advisor

Dear befuddled.

 

There is an option in the API for including/excluding Extension:

 

Centermark.ExtensionLinesVisible() As Boolean

 

Depending on your iLogic skills you could add it to your existing code.

 

Ordinarily - for a repeated pattern - drafting standards typically only require only those shapes that define the pattern to be annotated.  So in the example shown, you'd probably only center mark the two you've highlighted (and one below) to fully define the pattern.  This might save you some headaches, and certainly save a lot of clicking.

Peter
Message 3 of 3

damjan_baraga
Enthusiast
Enthusiast

Mybe helps...

 

' Get the active document (must be an IDW file)
Dim oDrawDoc As Inventor.DrawingDocument
oDrawDoc = ThisApplication.ActiveDocument

' Loop through all sheets in the drawing
For Each oSheet As Inventor.Sheet In oDrawDoc.Sheets
    ' Remove Center Marks
    While oSheet.Centermarks.Count > 0
        oSheet.Centermarks.Item(1).Delete()
    End While

    ' Remove Centerlines
    While oSheet.Centerlines.Count > 0
        oSheet.Centerlines.Item(1).Delete()
    End While
Next

' Show message when done
MessageBox.Show("All Center Marks and Centerlines have been deleted.", "iLogic Script")
0 Likes