Wednesday, April 13, 2005

The "Big Picture" - Interview with Jim Quanci (Autodesk)

Hello,

Sometimes we get too deep into programming and loose focus about the most important things involved in our business. Companies are discovering the great benefits of develop their own solutions for AutoCAD. Thinking on this, I have decided to make another interview to allow you to see the "Big Picture" of ObjectARX development. I have contacted Jim Quanci, ADN Program Worldwide (Senior Manager), to talk about these things around ObjectARX development. Hope you stop to code a little bit and think about what Jim have answered!

[Fernando:] Jim, how long are you an Autodesk member and from where you begin inside Autodesk until reach the current position?

[JIM:] I have been at Autodesk for just over 15 years – started when Autodesk just released AutoCAD Release 10. I initially started working with Autodesk’s hardware partners of which there were many. This was back in the days when we supported 9 different hardware platforms including several Unix flavors and the Mac. After working with software partners in Americas and then in Asia for several year as part of the Autodesk Registered Developer Program, my team started the Autodesk Developer Network (in 1997).

[Fernando:] On the last Autodesk University people have talked about how to involve users and developers communities around Autodesk products. What is your personal opinion about this strategy and how ADN is contributing on this?

[JIM:] Companies are becoming increasingly sophisticated users of technology and are being driven to integrate their technology systems to stay competitive. Users and developers are searching for ways to integrate the software technologies they are using for competitive advantage. I believe by creating wide awareness of the capabilities to integrate Autodesk technologies with other systems including CRM and ERP, users and developers will move toward taking advantage of the depth and breadth of Autodesk product customization capabilities. ADN is just one of several programs from Autodesk helping users and developers get the most from their software investments. Along with ADN, other Autodesk programs supporting deeper use of Autodesk products and technologies include Autodesk Subscription, Autodesk Training Centers (ATC), Autodesk Official Training Courseware (AOTC) and Autodesk Inventor Certified Expert.

[Fernando:] ADN is getting bigger and today we can see several companies working on products that run on the top of AutoCAD. Why some people still can't see clearly the power of customized solutions?

[JIM:] Today, over 2500 companies from around the world develop custom solutions based on Autodesk platforms. Over 300 companies join ADN for the first time every year. The number of Autodesk customers developing custom built applications to give them a competitive advantage is growing every year. It is just a matter of time.

[Fernando:] What are the main benefits to develop your own solutions inside AutoCAD?

[JIM:] The primary advantage of using an existing design product to build an application on is all about not reinventing the wheel. Autodesk’s is investing hundreds of millions of dollars every year increasing the capabilities of Autodesk design platforms – AutoCAD, Autodesk Inventor, Autodesk Map 3D, Autodesk Architectural desktop, Autodesk Revit and more. Why invest money developing basic design functionality and all the ancillary support software needed to work with printers and graphics cards from numerous manufacturers?

[Fernando:] Why so many developers stay away from ObjectARX? Is this due its long learning curve, poor documentation (like books and websites) or just because they love VBA and VisualLISP?

[JIM:] The idea that people avoid ObjectARX is a misnomer. ObjectARX is the most popular API for ADN members with over 50% of ADN members using ObjectARX – more then LISP, VB and VBA. Among Autodesk customers, LISP, VB and VBA are more popular then ObjectARX which makes a lot of sense as casual part time software developers frequently don’t have the time to become C++ proficient.

[Fernando:] ADN has a subscription cost that is cheap for companies but very expensive for independent developers. Is there any plans to create a lower rate (or even free) limited subscription program for this kind of developers?

[JIM:] The lowest cost option to join ADN today is 1200 (USD in Americas and APac and Euros in the rest of the world). This includes access to virtually all Autodesk products, unlimited direct support from Autodesk software engineers, and attendance at future technology briefings – at no extra cost. Compare this to the Microsoft Developer Network where one pays $2000 for access to most software and for limited direct support. We are not currently planning a lower cost ADN membership offering. Today we provide basic application development information through the Autodesk Developer Center (www.autodesk.com/adn) with free/self support through customization discussion groups.

[Fernando:] ADN promote several events around the world but these events are closed to ADN members. Is there any Autodesk developer event opened to all users?

[JIM:] I believe you meant to say are there ADN events that are open to non-ADN members. The answers is yes. We hold software development conferences for non-ADN members at several sites around the world every year – to bring customers up to speed on our latest technologies while we also promote their joining ADN to learn. Last year we held these “open to everyone API conferences” in China, Japan, United States, England, Sweden, and Germany. In this coming year, we expect to hold similar API conferences in China, Russia, Poland, and several other countries. One does need to be an ADN members to participate in our annual “Autodesk Developer Days” conferences where we present confidential information to ADN members on future releases of Autodesk products and technologies.

[Fernando:] How many ADN members are registered today and how Autodesk plans to expand this number?

[JIM:] There are over 2500 ADN members today and the number is growing every year. We are investing especially heavily this year recruiting new ADN members in China and Eastern Europe.

[Fernando:] We currently have AUGI as an opened group for AutoCAD users. Is that possible that Autodesk support or even create some kind of ADGI (Autodesk Developers Group International) ?

[JIM:] Autodesk would be happy to support such a group – as we supported “Autodesk Developers Group Europe” (ADGE) for many years. ADN is the Autodesk support program for professional software developers. We are not currently pursuing creating and ADGE like group ourselves.

[Fernando:] How do you think .NET will change the way developers create solutions today?

[JIM:] .NET is all about increasing programmer productivity. To some degree, .NET was hijacked by the Internet boom. Many people missed that the primary benefit of .NET is not about the Internet but about giving programmers easy to learn and use powerful tools to get their job done. .NET makes C++ experts faster/more productive. .NET gives VB programmers the power of C++ without the complexity. .NET is a great software development environment and Visual Studio .NET is a great software development tool – a big improvement over past software development technologies.

Thank you!

5 comments :

Quince said...

I never knew my dad was soo godd at Interviews.
-son
Andrew Quanci

Abhishek Panse said...

I am getting runtime error only in the debug version of vs 2005. for this code.


AlpaSlabElement *element=new AlpaSlabElement;
acedInitGet(RSG_NOZERO|RSG_NONEG,NULL);/*Initializes the acedGetXXX() functions */
int elementnumber;
acedGetInt(_T("Enter element number"), &elementnumber);
element->SetNumber(elementnumber);

int thickness;
acedGetInt(_T("Enter thickness of the SlabElement"),&thickness);
element->setThickness(thickness);

AcDbDatabase *pcurrDb;
pcurrDb=acdbHostApplicationServices()->workingDatabase();/*Step1: Get CurrentWorking Database*/

AcDbBlockTable *pblockTable;
if (pcurrDb->getSymbolTable(pblockTable, AcDb::kForRead) != Acad::eOk)/*step2: Get block table*/
{
acutPrintf(_T("\nRuntime Error #1"));
return ;
}

AcDbBlockTableRecord *pblockTableRecord;
if (pblockTable->getAt(ACDB_MODEL_SPACE, pblockTableRecord, AcDb::kForWrite) != Acad::eOk)/*step3: Get model space*/
{
acutPrintf(_T("\nRuntime Error #2"));
pblockTable->close();
return ;
}
pblockTable->close();/*Closing the Blocktable. No more required*/

if (pblockTableRecord->appendAcDbEntity(element) != Acad::eOk)/*step4: append entity into the modelspace*/
{
acutPrintf(_T("\nError Writing to the Model Space"));
pblockTableRecord->close();
return ;
}
AcGePoint2d pt1 ;
acedGetPoint(NULL,_T("\nEnter start point:"),asDblArray(pt1));
element->addVertexAt(0, pt1);

AcGePoint2d pt2 ;
acedGetPoint(NULL,_T("\nEnter next point:"),asDblArray(pt2));
element->addVertexAt(1, pt2);

AcGePoint2d pt3;
acedGetPoint(NULL, _T("\n Enter next point:"), asDblArray(pt3));
element->addVertexAt(2, pt3);

AcGePoint2d pt4;
acedGetPoint(NULL, _T("\n Enter end point:"), asDblArray(pt4));
if (element->addVertexAt(3, pt4))
{
acutPrintf(_T("\nAcDb Error"));
element->close();
return ;
}

element->minimizeMemory();
element->close();/*Closing the entity*/

pblockTableRecord->close();/*closing the blocktable(model space) record*/



What could be the reason.

Fernando Malard said...

Hello abhi,

Your code outline seems to be ok.
Did you test the same code using a native entity like AcDbLine?

The problem can be related to your custom object class itself. Check if your dwgInFields/dwgOutFields are loading/saving your class members at the same order.

Further, check if you have some unsafe use of a pointer that can be NULL at some scenarios.

Regards.

Abhishek Panse said...

Hi fernando,
I looked into suggestions you told.
Not able to find the cause of the problem.

Sorry did not put run-time error message earlier.

Run-Time Check Failure #2 - Stack around the variable 'pt4' was corrupted.

Please give me some more hints if possible.

Abhishek

Fernando Malard said...

Abhishek,

There is a problem here:

if (element->addVertexAt(3, pt4))
{
acutPrintf(_T("\nAcDb Error"));
element->close();
return ;
}

addVertexAt() method returns an Acad::ErrorStatus code and your IF statement should be:

if (element->addVertexAt(3, pt4) != Acad::eOk)
{
acutPrintf(_T("\nAcDb Error"));
element->close();
return ;
}

In fact you are not doing the same error check for the previous 3 vertexes and I think this is not a necessary error check.

Another issue is a memory leak. You alloc memory for your element at the code beginning and there are several return possibilities before reach the appendAcDbEntity() call. On all these cases you should deallocate the pointer memory calling a delete onto element before return.

Once it is added to ModelSpace you cannot delete it anymore.

Regards.