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: 

_Document vs Document

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
noontz
712 Views, 2 Replies

_Document vs Document

Hi..  I´m a little insecure on this issue. Hope someone can straighten it out.

 

The eventhandler for ApplicationEvents.OnSaveDocument first parameter is of the type _Document

 

There is no search results in the help file ( nor this forum or related blogs ) for _Document except for an example on the use of DrawingViews.AddBaseView() where it also shows up as the first parameter.

 

Is _Document the exact same type as Document ? Changing the type to Document in the eventhandler compiles and works?  What´s the catch?? Is this a consistent naming convention throughout the API ( Is _Application the same as Application )  

 

Just to elaborate on my confusion:  Do not use underscores, hyphens, or any other nonalphanumeric characters.

 

Some clarification would be most appreciated

2 REPLIES 2
Message 2 of 3
adam.nagy
in reply to: noontz

Hi,

 

If you look at the definition of each then it seems that _Document is the class and Document is the interface. 

 

As you can see it's not Inventor specific as you can find similar things about Word: http://www.add-in-express.com/forum/read.php?FID=5&TID=3388

 

You should just use whatever is offered by Visua Studio when creating the event handler.

 

Cheers,



Adam Nagy
Autodesk Platform Services
Message 3 of 3
noontz
in reply to: adam.nagy

Thanks alot for your reply Adam!

 

So if I understand this right Document is upcasted to _Document in the eventhandler & that´s why it works anyway.

 

Makes sense..  I just get a little nervous when unexposed ( and unexplained ) classes show up Smiley Wink

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

Post to forums  

Autodesk Design & Make Report