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.
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 .
© 2025 OneMinuteCode. All rights reserved.