Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to find and get coordinates of a CustomTable?

1 REPLY 1
Reply
Message 1 of 2
bsee1
373 Views, 1 Reply

How to find and get coordinates of a CustomTable?

In Inventor, I want to look for a table called "MS6 Report".  If the table exists, I want to get its coordinates, and delete the table.  If it doesn't exist, I'd just like to let the user place a table.  How can I check if a customtable by this name already exists in the document?  Here is what I have so far...

 

if (aDoc.ActiveSheet.CustomTables.Equals("MS6 Report"))
   {
    //get table coordinates
    //delete table
   }
else
   {
userInteract = m_inventorApplication.CommandManager.CreateInteractionEvents();
                keySelect = userInteract.KeyboardEvents;
                keySelect.OnKeyDown += new KeyboardEventsSink_OnKeyDownEventHandler(keySelect_OnKeyDown);
                mouseSelect = userInteract.MouseEvents;
                mouseSelect.OnMouseDown += new MouseEventsSink_OnMouseDownEventHandler(Table_Update_Placement);
   }

 

 

The else statement works great. No problems there. How can I find, get coordinates of, and delete a custom table by the name of "MS6 Report"?

*****************************
Win7 x64 - 16gb ram
i7 3610qm
FirePro M4000

Inventor 2013
ETO 6.1
1 REPLY 1
Message 2 of 2
Mike.Wohletz
in reply to: bsee1

Something like this..

 

   For Each oCustomTable As CustomTable In oDrawDoc.ActiveSheet.CustomTables
            If oCustomTable.Title = "MS6 Report" Then
                Return oCustomTable.Position()
            End If
        Next

 

 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report