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: 

active document as sub parameter

1 REPLY 1
Reply
Message 1 of 2
^_^clovis^_^
199 Views, 1 Reply

active document as sub parameter

Hello,

(I'm a newbie with VBA Inventor.)

I'd like to write a private sub in a module that would be called from the main Sub.

I'd like to have the active document as a parameter for this private sub but I can't find the solution to make it works.

Thanks for any help

 

 

Dim oInvDoc As Document
Set oInvDoc = ThisApplication.ActiveDocument

If oInvDoc.DocumentType = kAssemblyDocumentObject Then
  updateTag(oInvDoc)
endif

Private Sub updateTag(oDoc As Document)

Dim oDocu As Document
Set oDocu = oDoc
..
End Sub

 

1 REPLY 1
Message 2 of 2
Rene_Gerlach
in reply to: ^_^clovis^_^

Try this:
If oInvDoc.DocumentType = kAssemblyDocumentObject Then
  call updateTag(oInvDoc)
endif

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

Post to forums  

Autodesk Design & Make Report