VBA
Discuss AutoCAD ActiveX and VBA (Visual Basic for Applications) questions here.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Error when open DWG TrueView in VBA

3 REPLIES 3
Reply
Message 1 of 4
Anonymous
2456 Views, 3 Replies

Error when open DWG TrueView in VBA

Hi All,

I have got a problem when I am trying to open dwg file by DWG TrueView in VBA. I always got error say : ActiveX component can't create object when it comes to
Set App = CreateObject("DWGVIEWR.Application")

Have I got something wrong or I am missing any reference?

Thanks
Daniel
3 REPLIES 3
Message 2 of 4
Anonymous
in reply to: Anonymous

have you declared app as folowed?

dim app as object

try the following text:

dim app as object
Set App = CreateObject("DWGVIEWR.Application")
App.Visible = True

check if "DWGVIEWR.Application" exists in your registry
Message 3 of 4
Anonymous
in reply to: Anonymous

Hi sw,

Thanks for your reply.

I did declare app. But How can I check "DWGVIEWR.Application" exists in my registry?Just search "DWGVIEWR.Application" in my registry? I searched but not there? How can I register it?

Cheers
Daniel
Message 4 of 4
staubli
in reply to: Anonymous

Hello,

I have also same question

I have a program (visual basic 6.0)

from this program , I can open a DWG file in Autocad

 

Dim Acadapp As Object ' Autocad Library is not define to be able to use different version !

On Error Resume Next
' Set Acadapp = GetObject(, "AutoCAD.Application.16")
Set Acadapp = GetObject(, "AutoCAD.Application")


If Err.Number <> 0 Then
    ' Set Acadapp = CreateObject(, "AutoCAD.Application")
    On Error GoTo 0
    Set Acadapp = CreateObject("AutoCAD.Application")
End If

Acadapp.Documents.Open (Myfile)
Acadapp.Visible = True

 

 

Now I want to be able to open a file with DWG TrueView

(I run the program on a PC where no Autocad is setup , only DWG TrueView 2011)

 

I have make many test , but I do not succeed to select application DWGTrueView ?

 

Dim Acadapp As Object

 

Set Acadapp = GetObject(, "DWGVIEWR.Application.17")
Set Acadapp = GetObject(, "DWGTrueView.Application")
Set Acadapp = GetObject(, "DWG TrueView.Application")
Set Acadapp = GetObject(, "DWG TrueView 2011.Application")

all of them failed with error message "error 429 ActiveX can not create this componant"

 

 

=> is it possible to make a macro , which can open DWG file with TrueView ?

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

Post to forums  

Autodesk Design & Make Report

”Boost