ObjectARX
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

ARX functions

7 REPLIES 7
SOLVED
Reply
Message 1 of 8
vladop
736 Views, 7 Replies

ARX functions

Hi,

does someone know how to configure and use ObjectARX (and ObjectDBX) functions given in Section M of the AutoCAD Electrical API Help?

Where is "acepmclientapp.lib" located?

Can someone explain me instructions given below?

 

Linking

To use the the Project Database Service client you need to:

  1. Include the header file: "v:\acade\aceperformance\acepmclientapp\acepmclientapi.h"
  2. Link to the library file: $(OutDir)\acepmclientapp.lib
  3. Load your ARX after AcePmClientApp.arx is loaded. This is typically done in the ACADE.rx file.

To use the the ObjectDBX classes you need to:

  1. Include the relevant header file from the "v:\acade\aceperformance\acepmdefun\" folder.
  2. Link to the library file: $(OutDir)\acepmdefun.lib
  3. Load your ARX after AcePmDefun.arx is loaded. This is typically done in the ACADE.rx file.

 

vladop_1-1656623234010.png

 

Regards,

Vladimir

Tags (1)
7 REPLIES 7
Message 2 of 8
tbrammer
in reply to: vladop

It's probably better to ask this in the AutoCAD Electrical Forum.


Thomas Brammer ● Software Developer ● imos AGLinkedIn
If an answer solves your problem please [ACCEPT SOLUTION]. Otherwise explain why not.

Message 3 of 8
vladop
in reply to: tbrammer

I agree.

I posted it on AutoCAD Electrical Forum but it was moved here.

Message 4 of 8
daniel_cadext
in reply to: vladop

I know mechanical has its own SDK, but I didn't see a download for electrical. I assume you searched your install dir?

 

I'd start by looking through the code samples, look in the ObjectARX and C# for Electrical specific code.

looks like an ultra fun resbuf party

 

Python for AutoCAD, Python wrappers for ARX https://github.com/CEXT-Dan/PyRx
Message 5 of 8
vladop
in reply to: daniel_cadext

I tried all that but no luck.

Maybe I missed something because I don't have experience with ObjectARX.

Generally I use AutoLISP and want to move to ObjectARX.

But this is not about programming, it's about Help documentation.

Someone from AutoCAD Electrical team or from Autodesk should give an explanation, they wrote ACADE API Help.

 

Regards,

Vladimir

 

Message 6 of 8
vladop
in reply to: vladop

Dear Autodesk,

I don't think that anyone can answer my question except Autodesk.

I hope you will do that instead of sending me a noreply e-mail.

 

vladop_0-1657071269747.png

Regards,

Vladimir

Message 7 of 8
daniel_cadext
in reply to: vladop

Hi,

 

I think if you download AutoCAD Electrical 2023, things might become a bit clearer as it defines acepmclientapi.h

I couldn't find the .lib file, so I made one using a .def file

 

 

LIBRARY "AcePmClientApp.arx"
EXPORTS
     PmGetApiName
     PmGetActive

 

 

 

lib /def:AcePmClientApp.def /out:AcePmClientApp.lib /machine:x64

 

then as a quick test I ran:

 

 

extern "C" __declspec(dllimport) const TCHAR * PmGetApiName();
extern "C" __declspec(dllimport) bool PmGetActive(TCHAR*, size_t);
#pragma comment(lib, "AcePmClientApp.lib")

    static void ArxTest_doit()
    {
        acutPrintf( _T("\nPmGetApiName = %ls"), PmGetApiName());
        std::array<TCHAR, MAX_PATH> activeProject = { 0 };
        if(PmGetActive(activeProject.data(), activeProject.size()))
            acutPrintf(_T("\nActiveProject = %ls"), activeProject.data());
        else
            acutPrintf(_T("\nActiveProject = FAIL"));
    }

 

Command: DOIT
PmGetApiName = AcePmClientApp
ActiveProject = C:\USERS\DAN\DOCUMENTS\ACADE 2023\AEDATA\PROJ\NFPADEMO\NFPADEMO.WDP

It would be nice if the libs were included, but it's not the end of the world as you can make them

Also it seams there's also defun analogs, .i.e acedinvoke WD_PDS_GET_ACTIVE_PROJECT
 so, it seems everything is there to get coding : )
 
Python for AutoCAD, Python wrappers for ARX https://github.com/CEXT-Dan/PyRx
Message 8 of 8
vladop
in reply to: daniel_cadext

Thanks a lot, Daniel! This is a great help!

It looked like there was something missing in their instructions, but I suspected it was my ignorance.

After your reply I see that they should really explain their instructions!

I don't understand why they even mentioned ObjectARX if they don't want to give a valid guide. Especially for beginners. ACADE is used by people who do schematic drawings, not programming.

I'm happy to accept your answer as a solution, I'm just afraid that's one more reason for them not to give an explanation.

 

Much appreciated,

Vladimir

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

Post to forums  

AutoCAD Inside the Factory


Autodesk Design & Make Report