Convert 2002 macro to work in current CAD

Convert 2002 macro to work in current CAD

Anonymous
Not applicable
1,413 Views
4 Replies
Message 1 of 5

Convert 2002 macro to work in current CAD

Anonymous
Not applicable

Our company used a custom macro that would allow you to input information into a dialog box with radio buttons and adjustable entries. The drawings themselves would alter when the macro was ran (i.e. Size of door/accessories/door serial numbers). The last time the macro was used was in AutoCAD 2002. The newer version does not allow you to run the macro in its current state. What we attempted to do was to redevelop the macro in Visual Basic in AutoCAD 2017. It was able to change data from the drawings but not the actual drawings. Is there any way we can convert the macro file from 2002 to work in current version of CAD? 

 

1.png3.pngcutlist before.png

 

0 Likes
1,414 Views
4 Replies
Replies (4)
Message 2 of 5

Alfred.NESWADBA
Consultant
Consultant

Hi,

 

welcome @Anonymous.autodesk.com!

 

>> Is there any way we can convert the macro file from 2002 to work in current version of CAD? 

I would start with asking the vendor (in most cases = copyright holder) of that "macro" (whereas this functionality seems to be more than just a macro.

In case it is your source you should know at best if it can be ported, what parts this application is built of and what will be necessary to port it .... or (may be the better idea) to not port that app, but redesign it and use the new functionality AutoCAD 2017 gives you more than AutoCAD 2002 (dynamic blocks, annotative objects to just mention two of them).

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
ISH-Solutions GmbH / Ingenieur Studio HOLLAUS
www.ish-solutions.at ... blog.ish-solutions.at ... LinkedIn ... CDay 2026
------------------------------------------------------------------------------------

(not an Autodesk consultant)
0 Likes
Message 3 of 5

Anonymous
Not applicable
How do we know if we can port it? What is the process of porting it? The
person who coded the Macro for us has left the company long ago. Our
current guy has no idea of the inner working of CAD, he is just IT. We
hired on a 3rd party programmer to help with this and after not being
able to troubleshoot getting the macro to work on the current version of
CAD, he suggested he could rewrite the macro in 2017 in Visual Basic.
After some time working on it, it does just 10% of what the macro could
do.





Billie R Van Horn III

R & D Engineer | Kingspan Insulated Panels

726 Summerhill Drive|Deland|FL 32724

Main: 386-626-6789 Ext: 4087

billie.vanhorn@kingspan.com

0 Likes
Message 4 of 5

rhesusminus
Mentor
Mentor
Based on my own experience, it should be possible to port this into working with 2017. There isn't THAT much that has happened with VBA since the 2002 version. Som changes due to 64-bit functionality should be expected.

As Alfred writes, you won't be using any of the new features in AutoCAD, but If you don't need that, and the application does exactly what you want, it should be possible to make it work on 2017.

Trond Hasse Lie
EPLAN Expert and ex-AutoCAD Electrical user.
Ctrl Alt El
Please select "Accept Solution" if this post answers your question. 'Likes' won't hurt either. 😉
0 Likes
Message 5 of 5

Alfred.NESWADBA
Consultant
Consultant

Hi,

 

>> How do we know if we can port it?

With the knowledge of development every code that is done without errors should be portable.

But depending on libraries that are used you might have to do work to port it to

  • newer release of AutoCAD
  • newer version of operating system
  • difference of 32bit and 64bit
  • other base programs/api's/... (e.g. if the tool has access to a database server then the type of access can have changed and needs a rewrite of the source code)

>> What is the process of porting it?

Read & understand the code, then do the changes you see that can't work any more.

Then start the application in a development environment and run tests to see where exceptions occur and needs a correction (to be done with different data)

At the end let different user try to work with the product to get the "unused usage" workflows error free.

 

>> The person who coded the Macro for us has left the company long ago.

If the code is well documented it should be ok for the new guy to understand the project.

But there are always some difficulties when other developers have to continue coding on an existing project

  • source code is not documented
  • the first developer is something like a genius and so the second guy don't really understand the complexity
  • the first developer made too many errors/fixes/errors/fixes/.... so that the code has reached a state that a rewrite would be much more efficient than to port these errors/fixes/...

>> Our current guy has no idea of the inner working of CAD, he is just IT.

When writing applications using some API's then the knowledge about the products behind the API's is not a must, but a big help. At least the IT guy needs a good support from your CAD guys.

 

>> We hired on a 3rd party programmer to help with this and after not being able to troubleshoot

>> getting the macro to work on the current version of CAD, he suggested he could rewrite the

>> macro in 2017 in Visual Basic.
>> After some time working on it, it does just 10% of what the macro could
Depending on the existing application, how big/complex is it, how "good" is the existing code documented and to understand, ... there are a lot of parameters which influences the manpower needed to get that done. So no-one here can tell you if "some time working to get 10% done" is great or not.

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
ISH-Solutions GmbH / Ingenieur Studio HOLLAUS
www.ish-solutions.at ... blog.ish-solutions.at ... LinkedIn ... CDay 2026
------------------------------------------------------------------------------------

(not an Autodesk consultant)
0 Likes