It is currently Sun May 26, 2013 3:02 am

All times are UTC





Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Mon Apr 21, 2008 5:52 pm 
Offline
MCAD Lurker

Joined: 21 Apr 2008
Posts: 2
I am not sure if this is just not possible or the words that I am using in internet and forum searches is incorrect, but I have found no information on the subject.

Essentially I would like to use the Inventor API (in Access 2k) to read iProperties in an IPT file.

I have found lots of great articles (here and elsewhere), that show how to get to the iproperties, so that part I am ok with. My problem is that I can not or do not know how to create a reference to Inventor.Application object (or whatever it should be) and therefore cannot open a Document.

All code samples that I have found use the VBA imbedded in Inventor and there get a reference to the document using:


Code:
Set myDoc = ThisApplication.ActiveDocument


But of course that only works in Inventor. How do i accomplish the same from Microsoft Access.

Thank-you
Bill


---------------------------------------
I found what I am looking for. For those that are interested, there are lots of samples in the C:\Program Files\Autodesk\Inventor 2008\SDK folders.


Share on FacebookShare on TwitterShare on DiggShare on DeliciousShare on TumblrShare on Google+
Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 21, 2008 7:35 pm 
Offline
MCAD Addict
User avatar

Joined: 22 Mar 2004
Posts: 530
Country: United States
State: Pennsylvania
CAD System: Inventor
Assuming you have Inventor installed and running on the same machine, the simplified code is...
Code:
Dim invAPP As Inventor.Application
Dim invActDoc As Inventor.Document

     Set invAPP = GetObject(, "Inventor.Application")
     Set invActDoc = invAPP.ActiveDocument


Make sure that you have a Reference set to the Inventor Type Library in your Access code.

_________________
Robert A. Williams
http://www.leacar.com
"Gentlemen...you can't fight here. This is the War Room!"


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 21, 2008 7:48 pm 
Offline
MCAD Expert

Joined: 11 Apr 2006
Posts: 1550
Country: Canada
State: Ontario
CAD System: Inventor
I think you need to add Autodesk Inventor Object Library in VB reference.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
POWERED_BY