Hey kbc
maybe a description of what your attempting to do will help, posting your files, or helpful screenshots..and systems specs will get you some replies...you are too vague..
My system specs
win7 -x64 Inventor Professional 2014
Intel(R) Core(TM) i7 CPU x980 @ 3.33GHz
RAM 24GB
Inventor Professional 2013 = no problem.
Only Not run apprentice.
Hi! Could you post the dataset or VB code here or send it to me directly (johnson.shiue@autodesk.com)? The information you provided so far is not enough for me to reproduce the problem.
Thanks!
Hi,
I'm curious to know if
If this is the case, the error you are seeing is “as-expected.”
Here is why:
ApprenticeServerComponent is meant to be used from outside Inventor process.
(for example, it can be used from Excel VBA once “Autodesk Inventor Object Library” is referenced)
Inventor 2013 x64 (64-bit version) has 32-bit version of VBA 6.3 (there’s no 64-bit version of VBA 6)
Since 64-bit Inventor is calling 32-bit VBA, each is running in a different process.
As the result apprentice works even from inside Inventor.
Inventor 2014 x64 is now equipped with 64-bit version of VBA 7.1 (new in R2014), and
VBA code is executed in the same process as Inventor.
Apprentice call doesn’t work because of this change.
I believe you will see the same issue with Inventor 2013 x86 (32-bit version), where
both Inventor and VBA are 32-bit and VBA is executed within Inventor process.
I was wondering if you can use the current Inventor application object > document object
instead of ApprenticeServerDocument
For example:
<doesn’t work inside Inventor>
Dim oApprentice As New ApprenticeServerComponent
Dim oDoc As ApprenticeServerDocument
Set oDoc = oApprentice.Open("C:\Test\Assembly\A1\A1.iam")
If oDoc.AllReferencedDocuments.count > 0 then
.....
<should work inside Inventor>
Dim oDoc As Document
Set oDoc = Inventor.ThisApplication.Documents.Open("C:\Test\Assembly\A1\A1.iam")
If oDoc.AllReferencedDocuments.count > 0 then
....
Hope this helps,
-Sami
nonno no body can help if you dont explain what you are actually doing and what the code is.
i am having an issue with approentice being used in my VBA now in inv 2014. you will see a response about vb7 now running inside inventor...
i am trying to find out some more about this. from what i can gather, we cannot use approentice inside inventor API for 2014 inventor onwards. we will likely have to use inventor instead of apprentice, at least in my case.
so if you can explain what you are doing, when you get the error, hit 'debug' and show us the code window and we can see the functions being called etc. i have some screenshots in this other post that you can see some of the code i was referring to. i would be interested to see if you have the same kind of "application or object defined error" in your variables as well.