Assign a value to system variable CGEOCS

Assign a value to system variable CGEOCS

aplitop
Participant Participant
479 Views
3 Replies
Message 1 of 4

Assign a value to system variable CGEOCS

aplitop
Participant
Participant

I would need an ObjectArx method or a way to execute the GEOGRAPHICLOCATION command in a completely transparent way for the user, passing it some parameters like reference point or file, and the EPSG code, so that it assigns a value to the CGEOCS variable.

0 Likes
480 Views
3 Replies
Replies (3)
Message 2 of 4

daniel_cadext
Advisor
Advisor

Maybe AcDbGeoData?

https://help.autodesk.com/view/OARX/2024/ENU/?guid=OARX-RefGuide-__MEMBERTYPE_Methods_AcDbGeoData

 

I've never used it though

Python for AutoCAD, Python wrappers for ARX https://github.com/CEXT-Dan/PyRx
0 Likes
Message 3 of 4

aplitop
Participant
Participant

Thank you for your reply.
Related to the AcDbGeoData class, I found this article (https://adndevblog.typepad.com/autocad/2016/04/positioning-geographicmarker-using-objectarxx.html)  that sets up a new SRC, and I want to try the example, but this line :

AcDbObjectPointer<AcDbGeoData> pGeoData;

gives me a error :

error C2039: ‘_close’: is not a member of ‘AcDbGeoData’),

I added the following includes:

#include ‘AcDbGeoCoordinateSystem.h’
#include ‘dbobjptr.h’
#include ‘dbGeoData.h’
But it still gives the error .


Any idea what to do so that I don't get that error and I can test the example.
Thanks for your help.

Regards.

0 Likes
Message 4 of 4

daniel_cadext
Advisor
Advisor

#include ‘dbGeoData.h’

AcDbObjectPointer<AcDbGeoData> pGeoData;

 

compiles fine for me.

Python for AutoCAD, Python wrappers for ARX https://github.com/CEXT-Dan/PyRx
0 Likes