Toggle visibility of objects inside drawings

Toggle visibility of objects inside drawings

Anonymous
Not applicable
413 Views
2 Replies
Message 1 of 3

Toggle visibility of objects inside drawings

Anonymous
Not applicable

Hi everyone,

I'm struggling to find a way to toggle the visibility of some objects (images) I have put inside my .IDW.

Cattura.PNG

Do you have an idea to get this with iLogic?

Thank you for you time,

 

Andrea

0 Likes
414 Views
2 Replies
Replies (2)
Message 2 of 3

mcgyvr
Consultant
Consultant

ReferencedOLEFileDescriptor.Visible Property

ReferencedOLEFileDescriptor.Visible Property

Parent Object: ReferencedOLEFileDescriptor

Description

Gets/Sets whether the linked/embedded object is visible in the graphics window.

Syntax

ReferencedOLEFileDescriptor.Visible() As Boolean

Property Value

This is a read/write property whose value is a Boolean.

Version

Introduced in version 2011



-------------------------------------------------------------------------------------------
Inventor 2023 - Dell Precision 5570

Did you find this reply helpful ? If so please use the Accept Solution button below.
Maybe buy me a beer through Venmo @mcgyvr1269
Message 3 of 3

Anonymous
Not applicable

Hi thanks for your reply,

I tried the following lines to toggle the visibility of one of my objects, but it does not work:

Dim oDoc As Document
oDoc = ThisApplication.ActiveDocument
Dim aOLERefs() As ReferencedOLEFileDescriptor
ReDim aOLERefs(oDoc.ReferencedOLEFileDescriptors.Count)

Dim iRefCount As Integer
iRefCount = oDoc.ReferencedOLEFileDescriptors.Count
Dim i As Integer
For i = 1 To iRefCount
    aOLERefs() = oDoc.ReferencedOLEFileDescriptors.Item(i)
Next

For i = 1 To iRefCount
If aOLERefs(i).DisplayName = "ADX" Then
aOLERefs(i).Visible= False
End If 
Next

I got the following error: HRESULT: 0x80004005 (E_FAIL) 

 

Thanks again,

 

Andrea

 

 

 

0 Likes