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: 

Reg : Resolve document through vb.net

3 REPLIES 3
Reply
Message 1 of 4
naresh_kalyan
383 Views, 3 Replies

Reg : Resolve document through vb.net

Hi all,

I'm trying to resolve a document by using OnResolvedocument as one of the file access events. I have installed the events as well. I could able to see the addin template in vb.net templates. But, When I'm trying to add the file access event into my Project, it is prompting an error as shown in attachment. Please find.

Someone's help would be appreciated.

 

Thanks in advance.

 

Regards

NKalyan

3 REPLIES 3
Message 2 of 4
humbertogo
in reply to: naresh_kalyan

NullReferenceException occurs when you try to reference an object in your code that does not exist.
For example, you may have tried to use an object without using the New keyword first, or tried to use an object whose value is set to null (Nothing in Visual Basic).

Message 3 of 4
naresh_kalyan
in reply to: humbertogo

I strucked-up at OnResolve document  event in the code. Can someone check the code and let me know what exactly need to be done if the drawing is missing its reference.

 

Anyone's help would be greatly appreciated.

 

 

Regards

NKalyan

Message 4 of 4

Hi everyone,

I got the correct API and the code should be as given below...

 

Instead of resolving the document, it could be ReplaceReference.

 

oDwg.ActiveSheet.DrawingViews(1).ReferencedDocumentDescriptor.ReferencedFileDescriptor.ReplaceReference(oRefFilename)

 

Might be useful for anyone who's trying to Resolve the documents using VB.net

 

Regards

NKalyan

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

Post to forums  

Autodesk Design & Make Report