Update a project to ObjectARX2015

Update a project to ObjectARX2015

Anonymous
Not applicable
971 Views
4 Replies
Message 1 of 5

Update a project to ObjectARX2015

Anonymous
Not applicable

Hello,

I am in need of some help getting a custom .arx to work in 2015. I use Visual studio 2012 (which i had never opened before this)

Im not a software engineer and I am learning by doing, so bare with me...The original programmer has left the building and holds us ransom.

 

What the program should do:

Add a button to the toolbar, that stays there between sessions, and opens the custom program when pressed

 

What it does after my clueless fiddling right now. (AKA googleing the debugg errors, there were alot of them, close to a gazilion):

.arx works, however the button doesnt show up in the toolbar until the command is typed in the commandprompt. Button goes away between sessions.

 

I believe the reason is that i have dubbleslashed something that i shouldnt.. just to get a succesfull build.

The Error i get if i dont dubbleslash HWND in acedads.h is:

Error C2732: linkage specification contradicts earlier specification for (adsw_acadMainWnd)

acrxEntryPoint.cpp(64) 

 

In acrxEntryPoint.cpp

#define szRDS _RXST("")
extern "C" HWND adsw_acadMainWnd();
In acedads.h

const ACHAR *  acedGetAppName ();
int            acedUpdate(int vport, ads_point p1, ads_point p2);

#if defined(_WINDEF_) || defined(_ADESK_MAC_)
/* AutoCAD graphics window handle */
HWND           adsw_acadMainWnd();
#ifndef adsw_hwndAcad
#define adsw_hwndAcad adsw_acadMainWnd()
#endif

/* MFC "Document View" window handle */
ACCORE_PORT HWND adsw_acadDocWnd();

#endif  // _WINDOWS_

Those are the 2 instances of 'adsw_acadMainWnd' i can find.

I've tried google, yes. But can anyone help me with what to type instead? Or maybe my problem lies somewhere else?

 

Bonus questions:

 

I force the msi-installation to ..\ProgramData\Autodesk\ApplicationPlugins

Yay or Nay?

 

The original programmer left a subfolder with regkeys looking like this:

Appname18.1-9000-AutoCAD Civil 3D 2011.reg
.
.
.
.
Appname19.1-D001-AutoCAD 2014

Do i need to some miracle things with these and add a F-thingy? What and how? Add them to the msi?

 

Thank you for your time!

 

   

0 Likes
Accepted solutions (1)
972 Views
4 Replies
Replies (4)
Message 2 of 5

owenwengerd
Advisor
Advisor

You should remove the incorrect declaration for adsw_acadMainWnd from your acrxEntryPoint.cpp file. I highly recommend hiring an expert before you invest too much time in this, else I'm afraid you will waste a lot of time and money.

--
Owen Wengerd
ManuSoft
Message 3 of 5

Anonymous
Not applicable

@owenwengerd wrote:

You should remove the incorrect declaration for adsw_acadMainWnd from your acrxEntryPoint.cpp file. I highly recommend hiring an expert before you invest too much time in this, else I'm afraid you will waste a lot of time and money.


Dear Sir,

Thank you for your kind and, helpful and constructive answer.

Your answer to fix what the compiler told me, that i told you, is borderline A-class.

I erroneously thought this was a supportforum, lesson learned, among others.

 

I will not heed your advice to stop investing time(=money) in something that i want to invest time(=money) in.

Maybe I should have dropped out of the University because it was too time consuming and expensive.

 

_________________________________________________________________________________

Here is the solution:

The problem was a partial-cuix not loading.

Even the most self-proclaimed experts have (often) trouble with loading cuixs and registryediting.

Is there a easy fix? Yes Autodesk has Autoloader .bundle .xml even .rx.

You should look in to it. //old C# cuix-load attempt.

 

Bonus answers:

a) Yes

b) 2015 is E not F. But now obsolete since you load it differently.

 

All this from a basement dwelling unexpert with a working plugin.

________________________________________________________________________________

 

 

I leave you with a couple of advise:

1. Quit cycling, leave that to the experts. Its too expensive and you waste alot of time.

2. If you don't have anything to say, don't say anything at all

 

banned.h
0 Likes
Message 4 of 5

dgorsman
Consultant
Consultant

Steady on there.  Owen *volunteers* quite a bit of his time here on a very advanced subject.

 

His advice is spot on.  That advice is NOT to abandon your development work, and not to stop trying.  His advice is to start smaller than the task you have taken on. 

 

Flailing away at advanced coding with a copy'n'paste, try-as-you-go approach will leave undesireable after effects which will cause problems down the line.  When other problems occur you will be wasting time diagnosing them: is it a genuine problem, or something you tried earlier?  When it comes time for someone more knowledgeable to offer advice, they are unlikely to want to wade through a lot of that to help out.

 

I've been there.  Start small, understand the basics first.  The advanced stuff will come with time.

----------------------------------
If you are going to fly by the seat of your pants, expect friction burns.
"I don't know" is the beginning of knowledge, not the end.


Message 5 of 5

Anonymous
Not applicable
Accepted solution

Greetings!

First of all I must apologize, I've realized that my question clearly belongs in a diffrent place

 

Rest assure my friend, there has been no copying, no pasting or no flailing whatsoever! Just 100% working engineering.

No children were hurt, no animals were harmed and no c++ code were morphed into uncontrollable monster requiring extensive diagnosing.

 

I can only interpret your answer in such way that if you answer a post here you have to offer a complete soloution and offer lifetime support and guarantees. (i.e "When it comes time for someone more knowledgeable to offer advice, they are unlikely to want to wade through a lot of that to help out.")

 

I tried to be sarcastic and ironic in my original post make it stick out and hopefully get more attention. Clearly that backfired.

I will rewrite the original question, but the problem is exactly the same: 

 

Hello,

I just started to use VS2012 to build a simple App called "Hello World" that adds a partial cuix. 

Since im new I am follwing this tutorial I found and I managed to make it work in ACAD2013. However I'm trying to make it work in ACAD2015, I've updated the include directories to 2015 and the linker to *20. However the compiler throws this error: <see original post> <code inserted>

Ive tried to google it but i can't quite get it right. Anyone who can help me or point me in the right direction?

 

Nothing changed.

 

You still backing the advise that I should I hire an expert for trying to learn at home? GTFO kid? RTFM? Go to school to learn C++?

Seems small enough to start with to me.

 

I thought ADN Open were for noobs and ADN Professional for experts. Clearly I was misstaken.

 

I bid you good day.    

0 Likes