Assistance with development (Customization, C#)

Assistance with development (Customization, C#)

nck5678
Enthusiast Enthusiast
618 Views
3 Replies
Message 1 of 4

Assistance with development (Customization, C#)

nck5678
Enthusiast
Enthusiast

Hello everyone!

 

I am a civil engineer and have recently switched to a company (process based industry) in IT function. I have been entrusted with an project related to AutoCAD (listed below the details), and I find myself in quite a dilemma as there's a lot of issues I am facing (mostly for NOT being well versed with development), if any one can guide me here I will be grateful to the person/community.

 

Details:

So here the initial developers have done a lot of development aligned with AutoCAD (since almost two decades back). The development done is mostly to facilitate working of AutoCAD with aligned business modules. ( e.g. For electrical unit, an electrical module sets in when AutoCAD is launched. This module represents complex of various dot net programs, lisp routine, blocks and menu of general purposes. This work is facilitated through an plug-in (dll file) placed in C drive (at the time of installation) and macro's (In Lisp)/ supporting files placed in sever folder and alignment set in AutoCAD.

 

Work I need to do:

Task 1) Now, the app plug in which facilitates the environment setup was developed in VB net and recently modified to C# (By a developer in my team). The old functionalities were tested before this plug in was released & the developer who migrated the code left the organization a year back. In recent few months roll out to the plug in (C# based) with latest version was done and some of the functionalities (minor) were reported to be not working by users. 

 

Task 2) Also, the development work has been primarily done a decade back and there's no proper documentation and mostly the stuff which is not used is carried along with every latest release. My second important task is to housekeep the macros or specifically clean the files and do a documentation.

 

My Concern:

 

The major concern I face here with task 1 is that I am unable to understand what works how. In some documentation it is written that the commands which are not working are facilitated through a dll file, which is kept in sever folder. That I see is linked in the new C# code yet not shown in the AutoCAD environment. (This however can be seen in old environment i.e. Old version of AutoCAD with VB based module).

 

With task 2 I understand I will need to know what all the macros and sub routine does. (There are around 500 macro's in total). The team however feels, we need to migrate all LISP routines to C# and completely set the development environment to C#.

 

My Concerns:

Well, as I am not from IT background and lack capabilities in development. (My team is aware about this but as the developer's who had build these have retired and there's no one else, my team wants me to step up and are ready to support (with training requirement if I justify any).

I wish to know what are the capabilities I need to develop and learn to address the elephant in the room and also to know if the said task 2 (Completely migrating LISP routine's to C# can be done). I have tried learning LISP and C# as well, but I get lost and have only so far grasped basic's of C# (Creating a class, setting up project, compiling).  

 

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

norman.yuan
Mentor
Mentor

Here are my 2 cents:

 

It seems to me, your tasks are not "development", or at least not immediately. Rather it is streamlining the existing custom/in-house developed CAD resources, including the .NET API applications. What you need to do is figure out the reasons of why something do not work as they should: because of the code is wrong, or because the way of setup/deployment. Not sure how much you know AutoCAD as CAD user/CAD manager, but in situation like this, a good/knowledgeable CAD manager/user would be very helpful to identify the problems. 

 

You only jump into the development/coding side when you know it is the plugins' do not do things correctly/as expected. Then , you have to have a clear assessment about how much you know AutoCAD programming/.NET APIs. If you are a starter, the learning curve would be quite steep before you are capable to write .NET API plugins that is really useful in production.

 

As for your task 2, it is very common issue with most companies that carry a lots of legacy custom CAD tools, be it Acad script, LISP, VBA, plugins... But usually, it is not necessary to convert all LISP routines into .NET API (C#), it should only be done "as needed" - why fixing something that works?

 

I'd suggest you find someone who knows AutoCAD and its programming well (similar to the said previous developer?), working with you together, to go through your CAD environment and existing custom CAD apps/tools. If you are to tackle the development yourself, this would be a good way to get you started and get your feet wet (you did mention "training" could be justified, right?). That is, an "on-spot" training, which directly has the effect of solving your issues.

 

Hope this helps a bit.

Norman Yuan

Drive CAD With Code

EESignature

0 Likes
Message 3 of 4

nck5678
Enthusiast
Enthusiast

Hi,

 

Thank you for your detailed explanation, I appreciate your assistance.

 

You have rightly pointed the tasks can be categorized as streaming the existing custom/in-house developed resources.

 

I can say I have a fair knowledge of AutoCAD, I had been using AutoCAD in engineering workflows so I have pointed the trouble is with plug in.

 

Over these days, I had been in touch with old developer and worked to figure out the problem.

The concern here is that the old development was made in VB net and this developer (I talked with)  had migrated the plug-in code in C#.

Now, here he had a hunch that the functions (commands) that aren't working are associated with some old DLL files (which have been carried over from past) (In the plug-in, association to these dll's is given using XML.). The old DLL files are based on VB net and so in this plug (In C#) those commands are not called.

 

With this I foresee my task as to migrate these dll files to C#. (Either compile the old dll or get reference of old code and copy classes associated with those commands and migrate the class in new C# based code).

 

With second task the primary purpose is to remove excess chunk of data (which is not used) and document the leftover routines/lisps and migrate to C# completely. (This could be helpful if LISPs goes out of support and or as C# could be managed by any developer).

 

I have taken your inputs, and will ask for someone who knows programming well to work together.

Thanks for your input norman.yuan!

0 Likes
Message 4 of 4

norman.yuan
Mentor
Mentor

I suppose you do know that the code being VB.NET or C# is not an issue in terms of something working or not working. I would not "migrate" the old DLLs to C#, and only re-write them for necessary functionality changes or considerably heavier enhancements based on business requirement. So, an assessment of repairing the old VB.NET plugins vs. re-writing the same functionalities in C# is warranted, while in both cases, necessary enhancements might be considered, which may have different weight-factor in the 2 cases.

 

Since you said in your original post:

<QUOTE>

The major concern I face here with task 1 is that I am unable to understand what works how. In some documentation it is written that the commands which are not working are facilitated through a dll file, which is kept in sever folder. That I see is linked in the new C# code yet not shown in the AutoCAD environment. (This however can be seen in old environment i.e. Old version of AutoCAD with VB based module).

</QUOTE>

It seems to me that this is mainly the issue of understanding the plugins were structured/deployed, not being coded with VB.NET or C# (since VB.NET and C# all being compiled into the same .NET Framework DLLs).

 

Anyway, it is difficult to say more without knowing much details. But if you have concrete/detailed/isolated issue with specific chunks of code, I am sure more targeted discussions in this forum would help.

 

Norman Yuan

Drive CAD With Code

EESignature

0 Likes