Deleting clientgraphics on file close

Deleting clientgraphics on file close

sanjaysy
Enthusiast Enthusiast
443 Views
4 Replies
Message 1 of 5

Deleting clientgraphics on file close

sanjaysy
Enthusiast
Enthusiast
I have a macro which displays part information in drawing area of Inventor as clientgraphics.
In iam file clientgraphics of all the parts used in the iam is displayed & nothing is in readable state.
Could you help me to delete the clientgraphics whenever the file is closed or deactivated.

Thanks in advance
Sanjay

Regards,
Sanjay
0 Likes
444 Views
4 Replies
Replies (4)
Message 2 of 5

Anonymous
Not applicable
Hello Sanjay,

take a look at the attached file. Maybe it can help you.
There are some information regarding ClientFeatures.

Bye.
Luizoo from Brazil
0 Likes
Message 3 of 5

Anonymous
Not applicable
Hello Sanjaysy

You need to catch the event regardind Close or Deactivate and you can place the code lines below inside the event catcher.

"Dim oClientGraphics As ClientGraphics
Set oClientGraphics = oCompDef.ClientGraphicsCollection.Item("Your Client Graphic Name")
oClientGraphics.Delete"

Of course you need to check if oClientGraphics variable has or has not objects.
I had not understand your question.

See you.
Luizoo from Brazil
0 Likes
Message 4 of 5

sanjaysy
Enthusiast
Enthusiast
Hi Luizoo,

Thank you, thank you very much.

Sanjay

Regards,
Sanjay
0 Likes
Message 5 of 5

Anonymous
Not applicable
Maybe I'm missing something here, but client graphics aren't saved. The
only exception to this being if you create client graphics associated with a
client feature. But you should only be doing that if you want to be able to
save them. Otherwise you can create standard client graphics, whose
lifetime is only while that document is open. You can easily verify this by
creating client graphics, saving the document, closing it, and reopening it.
You won't see the client graphics since they weren't saved.
--
Brian Ekins
Autodesk Inventor API Product Designer
http://blogs.autodesk.com/modthemachine
0 Likes