tag:blogger.com,1999:blog-10425945.post110884932046947356..comments2024-03-14T18:15:27.812-03:00Comments on ObjectARX & Dummies: Appendix A - Debug versus ReleaseFernando Malardhttp://www.blogger.com/profile/09852061806995998594noreply@blogger.comBlogger61125tag:blogger.com,1999:blog-10425945.post-3267220291686516372015-09-07T10:26:19.518-03:002015-09-07T10:26:19.518-03:00Hi Gaurav,
Before answer your question, please po...Hi Gaurav,<br /><br />Before answer your question, please post and be patient to see it published because the Blog has a Spam filter and all posts must be approved before they are displayed at the Blog. You posted more than 5 times the same question. I have deleted the other posts and assuming this first as the one I will consider.<br /><br />Back to your question, it seems you are trying to register a command with the same name.<br />Did you install the AutoCAD.NET Wizard to create the project for you?<br />It does create a dummy project with samples showing all available command registration options.<br /><br />Take a look at this page and download the appropriate AutoCAD.NET Wizards accordingly to your AutoCAD version:<br /><br />http://usa.autodesk.com/adsk/servlet/index?id=1911627&siteID=123112<br /><br />The AutoCAD.NET Wizards download URLs are the very end of that page.<br />Hope it helps.Fernando Malardhttps://www.blogger.com/profile/09852061806995998594noreply@blogger.comtag:blogger.com,1999:blog-10425945.post-20813930016502348842015-09-07T07:25:48.289-03:002015-09-07T07:25:48.289-03:00Hi Fernando,
Error I am facing:
Command: Cannot l...Hi Fernando,<br />Error I am facing: <br />Command: Cannot load assembly. Error details: Autodesk.AutoCAD.Runtime.Exception: eDuplicateKey<br /> at Autodesk.AutoCAD.Runtime.CommandClass.AddCommand(ICommandLineCallable ca, MethodInfo mi)<br /> at Autodesk.AutoCAD.ApplicationServices.AutoCADApplicationHolder.Initialize(Assembly assembly)<br /><br />Solution I found after going through forums:<br /> You have multiple CommandMethod attributes, or<br /> LispFunction attributes with the same command or function name.<br /><br />I tried to find attributes or functions but not able to.Can you tell me how can i find these things and change those????Anonymoushttps://www.blogger.com/profile/06603760099480403115noreply@blogger.comtag:blogger.com,1999:blog-10425945.post-61013373763955634642015-08-18T10:14:49.049-03:002015-08-18T10:14:49.049-03:00Hi Sandhya,
I have created an article about this....Hi Sandhya,<br /><br />I have created an article about this.<br />Take a look:<br /><br />http://arxdummies.blogspot.com.br/2015/08/find-all-acdbline-intersections.html<br /><br />Hope it helps you to solve your issue.<br /><br />Regards,<br />Fernando Malardhttps://www.blogger.com/profile/09852061806995998594noreply@blogger.comtag:blogger.com,1999:blog-10425945.post-40904175851328307492015-08-18T01:22:10.929-03:002015-08-18T01:22:10.929-03:00This comment has been removed by the author.Anonymoushttps://www.blogger.com/profile/08738618216401195640noreply@blogger.comtag:blogger.com,1999:blog-10425945.post-31107949353472341562015-08-17T09:25:53.431-03:002015-08-17T09:25:53.431-03:00Hi Sandhya,
Yes, you will need to add some logic ...Hi Sandhya,<br /><br />Yes, you will need to add some logic to deal with lines with multiple intersections.<br />A single Line might be crossed by several other lines.<br /><br />I would say you can do a routine caching the intersection points and the lines involved on that crossing point.<br />The point can be the key of a Dictionary list and the Value can be a ObjectId array with the IDs on lines involved.<br />You will have at least 2 lines for each crossing point.<br /><br />As you may be analysing again the same crossing point coming from another line you need to first check if your Dictionary has this point and then check if that objectId is already stored at the corresponding value.<br /><br />Anyway, there isn't a direct way of doing what you need.<br /><br />Regards,Fernando Malardhttps://www.blogger.com/profile/09852061806995998594noreply@blogger.comtag:blogger.com,1999:blog-10425945.post-44239778230316090552015-08-17T08:38:59.873-03:002015-08-17T08:38:59.873-03:00This comment has been removed by the author.Anonymoushttps://www.blogger.com/profile/08738618216401195640noreply@blogger.comtag:blogger.com,1999:blog-10425945.post-44060706479492316442015-08-17T01:20:17.319-03:002015-08-17T01:20:17.319-03:00This comment has been removed by the author.Anonymoushttps://www.blogger.com/profile/08738618216401195640noreply@blogger.comtag:blogger.com,1999:blog-10425945.post-73816413630151653802015-08-12T08:36:25.185-03:002015-08-12T08:36:25.185-03:00You can use the AcDbPolyline class passing the ver...You can use the AcDbPolyline class passing the vertexes through their coordinates.<br />Take a look at this class into the ObjectARX docs.<br /><br />I would recommend again a detailed read through the User's Guide where you will find a lot of valuable information.<br /><br />Further, if you take a look at this Blog's, I did an overall course where you can also get more information:<br /><br />http://arxdummies.blogspot.com.br/p/blog-page.html<br /><br />Regards,Fernando Malardhttps://www.blogger.com/profile/09852061806995998594noreply@blogger.comtag:blogger.com,1999:blog-10425945.post-60434117321111321162015-08-12T03:54:09.736-03:002015-08-12T03:54:09.736-03:00This comment has been removed by the author.Anonymoushttps://www.blogger.com/profile/08738618216401195640noreply@blogger.comtag:blogger.com,1999:blog-10425945.post-28517362056825723032015-08-11T08:48:31.573-03:002015-08-11T08:48:31.573-03:00Hi Sandhya,
It depends on what you plan to do.
As...Hi Sandhya,<br /><br />It depends on what you plan to do.<br />As an object oriented class hierarchy each class implements its own data protocol and also inherit from its parent classes.<br /><br />AcDbEntity, which is the entity elementar class, does contain entity common information like Layer, LineType, etc.<br />If you start to go down on its class tree you will find specific classes like AcDbLine which contains specific protocols like startPoint() and endPoint().<br /><br />Another important class to consider is AcDbCurve which encapsulates all parametric curve methods and properties. Sometimes you can handle your code by accessing this curve class and whatever you do with this pointer is valid across all entities deriving from AcDbCurve. It is pretty handy.<br /><br />So, unfortunately you need to use cast() operator sometimes to convert the pointer from AcDbEntity down to the class you expect to have. Keep in mind, as I said on the previous post, that the cast() might return NULL in some cases so you always should test the cast() results before proceed.<br /><br />If you just need to figure out whether a class is some specific class, there is a class descriptor through desc() method. This method can be used together with isKindOf() and isDerivedFrom() methods:<br /><br />pEnt->isKindOf(AcDbLine::desc());<br /><br />or<br /><br />pEnt->isDerivedFrom(AcDbLine::desc());<br /><br />These class protocol methods are available through every class derived from AcRxClass and I would suggest to read more about it at the ObjectARX User Guide.<br /><br />Hope it clarifies why you need to use cast().<br /><br />Regards,Fernando Malardhttps://www.blogger.com/profile/09852061806995998594noreply@blogger.comtag:blogger.com,1999:blog-10425945.post-64408056039581896682015-08-11T08:33:32.756-03:002015-08-11T08:33:32.756-03:00This comment has been removed by the author.Anonymoushttps://www.blogger.com/profile/08738618216401195640noreply@blogger.comtag:blogger.com,1999:blog-10425945.post-48097994279954959552015-08-11T07:47:53.052-03:002015-08-11T07:47:53.052-03:00Hi Sandhya,
Your code seems to be ok except for o...Hi Sandhya,<br /><br />Your code seems to be ok except for one thing.<br />Where you do the cast() if the entity pointed by the Iterator is not an AcDbLine or any class derive from it, the resulting l1 pointer will be NULL and then all access through this pointer will cause AutoCAD to crash.<br /><br />After you perform the cast() you need to test the pointer before continue. Something like this:<br /><br /><b><br />...<br /><br />l1=AcDbLine::cast(pEnt);<br />if (l1 != NULL)<br />{<br /> AcGePoint3d p1=l1->startPoint();<br /> acutPrintf(_T("start x:%d\n"),p1.x);<br /> acutPrintf(_T("start y:%d\n"),p1.y);<br /> <br /> AcGePoint3d p2=l1->endPoint();<br /> acutPrintf(_T("end x:%d\n"),p2.x);<br /> acutPrintf(_T("end y:%d\n"),p2.y);<br /> <br /> acutPrintf(_T("classname: %s\n"), (pEnt->isA())->name());<br />}<br /><br />...<br /></b><br /><br />This should solve your crash.<br /><br />Regards,Fernando Malardhttps://www.blogger.com/profile/09852061806995998594noreply@blogger.comtag:blogger.com,1999:blog-10425945.post-62559369310321528632015-08-11T03:58:54.134-03:002015-08-11T03:58:54.134-03:00This comment has been removed by the author.Anonymoushttps://www.blogger.com/profile/08738618216401195640noreply@blogger.comtag:blogger.com,1999:blog-10425945.post-47516684487845596832011-06-26T09:44:08.863-03:002011-06-26T09:44:08.863-03:00Thank you Smita, snehal, kirti and arati.
The Blo...Thank you Smita, snehal, kirti and arati.<br /><br />The Blog's intention is to help people. Glad it helped on your project and I hope you pass this knowledge to other people.<br /><br />Best regards.Fernando Malardhttps://www.blogger.com/profile/09852061806995998594noreply@blogger.comtag:blogger.com,1999:blog-10425945.post-13598035752175858042011-06-26T03:59:56.909-03:002011-06-26T03:59:56.909-03:00Hi,
Thank you so much sir,because of only ur dumm...Hi, <br />Thank you so much sir,because of only ur dummis we r able to complete our project successfully.<br />Smita,snehal,kirti,arati.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-10425945.post-64809408650777067162011-02-22T08:27:24.230-03:002011-02-22T08:27:24.230-03:00SNEHA,
What properties? Entity's properties l...SNEHA,<br /><br />What properties? Entity's properties like color, layer, etc?<br /><br />Please be more specific.Fernando Malardhttps://www.blogger.com/profile/09852061806995998594noreply@blogger.comtag:blogger.com,1999:blog-10425945.post-74396807357362351782011-02-22T03:08:54.159-03:002011-02-22T03:08:54.159-03:00Hi..
How to Change the properties at runtime in vc...Hi..<br />How to Change the properties at runtime in vc++?<br />Thanking you!!<br />SnehalSNEHAhttps://www.blogger.com/profile/08620680005939193672noreply@blogger.comtag:blogger.com,1999:blog-10425945.post-78943704121910405142011-02-14T07:55:49.280-02:002011-02-14T07:55:49.280-02:00SNEHA,
OnInitiDialog() method is an override from...SNEHA,<br /><br />OnInitiDialog() method is an override from the CDialog class.<br /><br />You just need to implement it following the standard function signature so it will be called when your dialog starts.<br /><br />Take a look at MFC documentation about this method and its usage.<br /><br />Regards.Fernando Malardhttps://www.blogger.com/profile/09852061806995998594noreply@blogger.comtag:blogger.com,1999:blog-10425945.post-20298132967775284032011-02-12T04:38:21.125-02:002011-02-12T04:38:21.125-02:00Hi,
Where we will find oninitdialog() function?
...Hi,<br /><br />Where we will find oninitdialog() function?<br /><br />Thanking You!SNEHAhttps://www.blogger.com/profile/08620680005939193672noreply@blogger.comtag:blogger.com,1999:blog-10425945.post-24261719922582040872011-02-10T07:43:35.752-02:002011-02-10T07:43:35.752-02:00SNEHA,
Take a look at Lab2 and you will have an e...SNEHA,<br /><br />Take a look at Lab2 and you will have an example on how to use CAcUi classes:<br /><br />http://arxdummies.blogspot.com/2005/04/lab-2-using-mfc-dialog.html<br /><br />Regards.Fernando Malardhttps://www.blogger.com/profile/09852061806995998594noreply@blogger.comtag:blogger.com,1999:blog-10425945.post-43816317758378136042011-02-10T01:41:23.356-02:002011-02-10T01:41:23.356-02:00hi..
Thank u!
I don't understand how to add CA...hi..<br />Thank u!<br />I don't understand how to add CAcUiNumericEdit class into my code for adding my variables.and I want static Box functions only.can u give me any sample code?SNEHAhttps://www.blogger.com/profile/08620680005939193672noreply@blogger.comtag:blogger.com,1999:blog-10425945.post-47024796974027356952011-02-09T18:36:33.563-02:002011-02-09T18:36:33.563-02:00SNEHA,
Take a look at the CAcUiNumericEdit class....SNEHA,<br /><br />Take a look at the CAcUiNumericEdit class. It does provide the EDIT box functionality but also provide some data validation features.<br /><br />More information here:<br />http://docs.autodesk.com/ACDMAC/2011/ENU/ObjectARX%20Reference/CAcUiNumericEdit.html<br /><br />Regards.Fernando Malardhttps://www.blogger.com/profile/09852061806995998594noreply@blogger.comtag:blogger.com,1999:blog-10425945.post-34705963778672531422011-02-09T12:34:43.080-02:002011-02-09T12:34:43.080-02:00Hi,
I have to add My X-variable value in static te...Hi,<br />I have to add My X-variable value in static textBox,which has doble datatype.so How can I add this value in the dialogBox?<br />Thanking You!<br />SnehalSNEHAhttps://www.blogger.com/profile/08620680005939193672noreply@blogger.comtag:blogger.com,1999:blog-10425945.post-74875469533682086602011-02-04T15:33:57.927-02:002011-02-04T15:33:57.927-02:00kirti,
"Distance conversion"? What do y...kirti,<br /><br />"Distance conversion"? What do you mean?<br /><br />There is a method called acutCvUnit() which converts a distance from one unit system to another.<br /><br />Also, take a look at:<br /><br />acdbDisToF()<br />acdbRToS()<br /><br />Regards.Fernando Malardhttps://www.blogger.com/profile/09852061806995998594noreply@blogger.comtag:blogger.com,1999:blog-10425945.post-56783542957935455582011-02-02T01:25:23.339-02:002011-02-02T01:25:23.339-02:00Hi,
How to read distance conversion table from aut...Hi,<br />How to read distance conversion table from autocad using objectarx?<br />Thanking you.<br />KirtiUnknownhttps://www.blogger.com/profile/04393449182127227485noreply@blogger.com