IJCAD version upgrade prevents Gcad.Application objects from being retrieved

Asked 2 years ago, Updated 2 years ago, 119 views

The program that works with IJCAD in VBA is
by updating IJCAD (2018→2019) Runtime Error 91 Object Variable with Block Variable is now displayed.

The VBA reference setting has been modified to 2019 in Gcad.
The CAD you are working with will still fail when it is started.

DimgetTimesec As Double
Dim GcadApp As GcadApplication
Set GcadApp=GetObject(, "Gcad.Application")  ← Object not retrieved in this line
Set GcadDoc= GcadApp.ActiveDocument

Is it because of the version of IJCAD that the object is no longer available, or is the code strange?
I'm a beginner at VBA, so I don't know if the above information is enough for me to make a decision, but I appreciate your cooperation.

Enter a description of the image here

vba ijcad

2022-09-30 21:46

1 Answers

When using GetObject in IJCAD 2019, I think you can get the object successfully by specifying the version.

First, look at the IJCAD library in the VBA and make sure that the IJCAD referenced in the VBA is up.

And

GetObject(, "Gcad.Application")

To specify the version of IJCAD that the retrieves,

GetObject(, "Gcad.Application.19")

Try rewriting to .


2022-09-30 21:46

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.