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: 

ReferencedOLEFileDescriptors.Add

5 REPLIES 5
Reply
Message 1 of 6
cwasniak
781 Views, 5 Replies

ReferencedOLEFileDescriptors.Add

If I use the function ReferencedOLEFileDescriptors.Add with the option of embedding a file I get an "Invalid Procedure" call error.
It works fine if I link the file.
Any ideas?
5 REPLIES 5
Message 2 of 6
cwasniak
in reply to: cwasniak

This works:

Dim oDrawDoc As DrawingDocument
Set oDrawDoc = ThisApplication.ActiveDocument
Dim xtt As ReferencedOLEFileDescriptor
Set xtt = oDrawDoc.ReferencedOLEFileDescriptors.Add("1.doc")
Unload Me

This does NOT:
Dim oDrawDoc As DrawingDocument
Set oDrawDoc = ThisApplication.ActiveDocument
Dim xtt As ReferencedOLEFileDescriptor
Set xtt = oDrawDoc.ReferencedOLEFileDescriptors.Add("1.doc", kOLEDocumentEmbeddingObject)
Unload Me
Message 3 of 6
Anonymous
in reply to: cwasniak

The API currently does not support adding embedded OLE references. The only
option is to use linking.

Sanjay-

wrote in message news:5206291@discussion.autodesk.com...
This works:

Dim oDrawDoc As DrawingDocument
Set oDrawDoc = ThisApplication.ActiveDocument
Dim xtt As ReferencedOLEFileDescriptor
Set xtt = oDrawDoc.ReferencedOLEFileDescriptors.Add("1.doc")
Unload Me

This does NOT:
Dim oDrawDoc As DrawingDocument
Set oDrawDoc = ThisApplication.ActiveDocument
Dim xtt As ReferencedOLEFileDescriptor
Set xtt = oDrawDoc.ReferencedOLEFileDescriptors.Add("1.doc",
kOLEDocumentEmbeddingObject)
Unload Me
Message 4 of 6
cwasniak
in reply to: cwasniak

That would explain why it is not working....

Thanks!
Message 5 of 6
Crstiano
in reply to: Anonymous

Hi Sanjay,

 

"The API currently does not support adding embedded OLE references "

 

Today (7y ago), this information is valid?

 

 

Cristiano Oliveira
Developer Addins | Consultant CAD/PLM | CAD Manager
https://www.ConsultCAD.com/


Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

Message 6 of 6
maxstels
in reply to: Crstiano

Also interesting

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

Post to forums  

Autodesk Design & Make Report