tag:blogger.com,1999:blog-10425945.post110678956333254146..comments2024-03-14T18:15:27.812-03:00Comments on ObjectARX & Dummies: WelcomeFernando Malardhttp://www.blogger.com/profile/09852061806995998594noreply@blogger.comBlogger56125tag:blogger.com,1999:blog-10425945.post-8129063838811790362011-11-04T02:37:09.620-02:002011-11-04T02:37:09.620-02:00thank !thank !cuong_tvhttps://www.blogger.com/profile/13744803180858236933noreply@blogger.comtag:blogger.com,1999:blog-10425945.post-18238713924838454562009-09-02T08:27:09.210-03:002009-09-02T08:27:09.210-03:00Hello Jimmy,
The idea of this Blog is to focus on...Hello Jimmy,<br /><br />The idea of this Blog is to focus on ObjectARX and I'm not an expert to help you with LISP issues.<br /><br />Sorry about that.Fernando Malardhttps://www.blogger.com/profile/09852061806995998594noreply@blogger.comtag:blogger.com,1999:blog-10425945.post-30073041265721907442009-09-02T04:37:43.109-03:002009-09-02T04:37:43.109-03:00hi fernando !
could i questioning programs about ...hi fernando !<br />could i questioning programs about AutoLisp in this ObjectARX blog ?<br /><br />if not<br />or any other a proper place for posting Autolisp comments and gets solutions from experts like you !Jimmy32https://www.blogger.com/profile/05359824800586473108noreply@blogger.comtag:blogger.com,1999:blog-10425945.post-14271247573621968752009-08-31T08:46:45.567-03:002009-08-31T08:46:45.567-03:00Well, in this case it will be difficult because th...Well, in this case it will be difficult because there is no easy way to select entities without aced methods.<br /><br />One possible solution would be use the intersectWith() capability of entities. In this case you could create some polygon or region with the same viewport geometry, translate it into ModelSpace coordinates and then check the intersection with entities.<br /><br />But I'm not sure this will work for entities entirely inside the viewport without touching its boundary.<br /><br />Can't think any other alternative right now...Fernando Malardhttps://www.blogger.com/profile/09852061806995998594noreply@blogger.comtag:blogger.com,1999:blog-10425945.post-41564734563766894312009-08-31T08:33:03.948-03:002009-08-31T08:33:03.948-03:00Thats correct. But how do you will select the enti...Thats correct. But how do you will select the entities coming under that window, if you are using RealDWG ( i.e. AcedGet* functions are not available.)<br /><br />thankssandyhttps://www.blogger.com/profile/02503582209971047801noreply@blogger.comtag:blogger.com,1999:blog-10425945.post-40174079388678827552009-08-31T08:19:38.779-03:002009-08-31T08:19:38.779-03:00sandy,
You did get me wrong.
What I wanted to exp...sandy,<br /><br />You did get me wrong.<br />What I wanted to explain is PaperSpace may contain its own entities and some of them will be the viewports you use. Inside the viewports there are no entities, it is just a view of some portion of ModelSpace.<br /><br />Exactly due that, when you double click inside a Viewport you are actually editing the original Modelspace.<br /><br />If you want to select the original entities that are visibile into some specific viewport you will need to do some selection filter by mapping the viewport coordinates to the Modelspace. With this "window" you can go back to Modelspace and select the actual entities.<br /><br />Regards.Fernando Malardhttps://www.blogger.com/profile/09852061806995998594noreply@blogger.comtag:blogger.com,1999:blog-10425945.post-57059220423711395102009-08-31T03:33:29.235-03:002009-08-31T03:33:29.235-03:00Hi Fernando,
Paperspace block table record doesnt...Hi Fernando,<br /><br />Paperspace block table record doesnt contains any entities from modelspace. It has single entity AcdbViewport. its not possible to get entities from paperspace layout blocktablerecord just like form modelsapce blocktablerecord.<br /><br />Thankssandyhttps://www.blogger.com/profile/02503582209971047801noreply@blogger.comtag:blogger.com,1999:blog-10425945.post-35620935044907807862009-08-27T10:29:26.985-03:002009-08-27T10:29:26.985-03:00Hello sandy,
Well, the Layout is a BlockTableReco...Hello sandy,<br /><br />Well, the Layout is a BlockTableRecord as the Modelspace so you can copy every entity inside it to the Modelspace.<br /><br />What is inside the viewport is not actually there, it is just a zoom view of some Modelspace area.<br /><br />So the same clone procedure you are using inside Modelspace can work from PaperSpace too.<br /><br />Regards.Fernando Malardhttps://www.blogger.com/profile/09852061806995998594noreply@blogger.comtag:blogger.com,1999:blog-10425945.post-87259928666729242242009-08-26T07:24:57.687-03:002009-08-26T07:24:57.687-03:00Hi Fernando,
I have a development scenario, pleas...Hi Fernando,<br /><br />I have a development scenario, please help me if you have any idea.<br /><br />I have a drawing, with one modespace and one paperspace layout.<br />Paperspace layout has a viewport focusing on small area on modelspace.<br /><br />Now i want get all entities from this paperspace layout (viewport) and add them to modelspace as BlockReference.<br /><br />Thanks in Advance.<br />Sandysandyhttps://www.blogger.com/profile/02503582209971047801noreply@blogger.comtag:blogger.com,1999:blog-10425945.post-10978120698973257052009-08-26T07:20:40.050-03:002009-08-26T07:20:40.050-03:00Thanks,
My problem is resolved.
In Stead on call...Thanks,<br /><br />My problem is resolved.<br /><br />In Stead on calling.<br /><br />getEntityId() & using id then calling getEntity(),<br />I replaced with getEntity()sandyhttps://www.blogger.com/profile/02503582209971047801noreply@blogger.comtag:blogger.com,1999:blog-10425945.post-20820798323881179292009-08-18T10:01:12.358-03:002009-08-18T10:01:12.358-03:00sandy,
"The objects can be from multiple sou...sandy,<br /><br />"The objects can be from multiple sources"...<br /><br />It should work inside the same database. Just give a try.<br /><br />Regards.Fernando Malardhttps://www.blogger.com/profile/09852061806995998594noreply@blogger.comtag:blogger.com,1999:blog-10425945.post-39157987887807166912009-08-18T09:57:51.571-03:002009-08-18T09:57:51.571-03:00Hi,
thanks for quick reply.
Here is a slight pro...Hi,<br /><br />thanks for quick reply.<br /><br />Here is a slight problem. Both the blocktablerecords are from same database. Do we have anything else that can be used for copying / cloning between same datbase blocktablerecords.<br /><br />Thankssandyhttps://www.blogger.com/profile/02503582209971047801noreply@blogger.comtag:blogger.com,1999:blog-10425945.post-72511238601984794392009-08-18T09:03:22.288-03:002009-08-18T09:03:22.288-03:00Hello sandy,
There is a much better way to do tha...Hello sandy,<br /><br />There is a much better way to do that. Take a look at AcDbDatabase::wblockCloneObjects() method.<br /><br />A brief description extracted from the SDK documentation:<br /><br /><b><br />Acad::ErrorStatus wblockCloneObjects(<br /> AcDbObjectIdArray& objectIds, <br /> AcDbObjectId& owner, <br /> AcDbIdMapping& idMap, <br /> AcDb::DuplicateRecordCloning drc, <br /> bool deferXlation = false<br />);<br /><br />"Clones all objects in the objectIds array and appends them to the container object specified by owner. The objects can be from multiple source databases, and must match the type of owner supplied, but must be from a different database than the owner object."<br /></b><br /><br />So you just need to create the new BlockTableRecord and use this method to clone all objects from the source BlockTableRecord.<br /><br />Hope this help.Fernando Malardhttps://www.blogger.com/profile/09852061806995998594noreply@blogger.comtag:blogger.com,1999:blog-10425945.post-64471279740570619142009-08-18T08:54:53.611-03:002009-08-18T08:54:53.611-03:00hi Fernando,
I want to create new blocktablerecor...hi Fernando,<br /><br />I want to create new blocktablerecord from existing blocktablerecord by copying all entities from existing blocktablerecod to a newl blocktablerecod.<br /><br />Following is the code i have written. which is not working.<br />can you help in this ? One more thing if i add a new entity such as line and add it to new blocktablerecord it works fine<br /><br /> AcDbBlockTableRecord *pBlkRec =NULL;<br /> Acad::ErrorStatus es = pBlkTbl->getAt(_T("*MODEL_SPACE"),pBlkRec, AcDb::kForRead);<br /> <br /> if(es == Acad::eOk)<br /> {<br /> AcDbBlockTableRecord *pBlkRecNew = new AcDbBlockTableRecord;<br /> pBlkRecNew->setName(_T("Model_Space"));<br /> pBlkTbl->add(pBlkRecNew);<br /> <br /> AcDbBlockTableRecordIterator *pBlockIter = NULL;<br /> pBlkRec->newIterator(pBlockIter);<br /> Acad::ErrorStatus es;<br /> for (; !pBlockIter->done(); pBlockIter->step())<br /> {<br /> AcDbEntity *pEnt;<br /> AcDbObjectId objectId;<br /> pBlockIter->getEntityId(objectId);<br /> <br /> es = acdbOpenObject(pEnt,objectId, AcDb::kForWrite); <br /> if( es == Acad::eOk)<br /> {<br /> AcDbEntity *pClone = (AcDbEntity *) pEnt->clone();<br /> Acad::ErrorStatus es3 = pBlkRecNew->appendAcDbEntity(pEnt);<br /> pEnt->close();<br /> }<br /> <br /> }<br /> pBlkTbl->close();<br /> pBlkRecNew->close();<br /> }sandyhttps://www.blogger.com/profile/02503582209971047801noreply@blogger.comtag:blogger.com,1999:blog-10425945.post-71141577811412027922009-08-04T14:04:16.508-03:002009-08-04T14:04:16.508-03:00Fernando,
Thank you very much for your answer......Fernando, <br /><br />Thank you very much for your answer... I tried to convince my boss I'd be simpler to adapt the code I have to work inside Autocad but he still thinks it's best to run it as a different application, now I have a point to start.<br />Thank you.Esaias Pechhttps://www.blogger.com/profile/14380627522600031788noreply@blogger.comtag:blogger.com,1999:blog-10425945.post-18831429206526740052009-08-04T08:41:37.048-03:002009-08-04T08:41:37.048-03:00Hello,
This level of integration you want can be ...Hello,<br /><br />This level of integration you want can be done by making your application a COM client of AutoCAD COM interface making calls and receving events from it.<br /><br />This is a very complex coding scenario and maybe you should consider to run your application inside AutoCAD to keep things simple.<br /><br />If you really need it to run outside AutoCAD, COM is the best way to automate AutoCAD from outside.<br /><br />Note that are some limitations of COM inside x64 systems in regards to in-process calls.<br /><br />Here you can find more info about COM Interop:<br /><br />http://through-the-interface.typepad.com/through_the_interface/2006/09/com_vs_net_in_a.html<br /><br />Regards.Fernando Malardhttps://www.blogger.com/profile/09852061806995998594noreply@blogger.comtag:blogger.com,1999:blog-10425945.post-70150305377449089762009-08-03T17:48:10.391-03:002009-08-03T17:48:10.391-03:00Hi Fernando,
I was wondering if there is a way t...Hi Fernando, <br /><br />I was wondering if there is a way to communicate Autocad with an Application I'm making in MFC, basically I'd like to access the Autocad Database from my stand-alone program.<br />For example, I'd like to give the 2 vertex of a line in my program and be able to see the line in Autocad (if I change those vertex in my program, Autocad should be able to refresh and draw the line again) and viceversa, if I change the size of the line in Autocad, I'd like to detect when that happens so I can modify my data in my program...<br />I hope my question makes sense..<br /><br />Thanks, saludos desde MexicoEsaias Pechhttps://www.blogger.com/profile/14380627522600031788noreply@blogger.comtag:blogger.com,1999:blog-10425945.post-26195885396183091602009-03-08T06:56:00.000-03:002009-03-08T06:56:00.000-03:00Oi Nilson,Você pode aproveitar algumas coisas do A...Oi Nilson,<BR/><BR/>Você pode aproveitar algumas coisas do ADS mas quase tudo muda para o ObjectARX.<BR/><BR/>Além disso, você precisa fazer o seu código ser UNICODE e ainda implementar suporte ao x64 no seu código.<BR/><BR/>Talvez seja melhor reescrever tudo mantendo somente a lógica do aplicativo.<BR/><BR/>Quanto ao AutoCAD R12, acho que não tem jeito mesmo. Tente usar uma máquina Virtual como o VirtualPC 2007 ou VMWare.<BR/><BR/>Abraços,Fernando Malardhttps://www.blogger.com/profile/09852061806995998594noreply@blogger.comtag:blogger.com,1999:blog-10425945.post-82925635992058316962009-03-06T22:00:00.000-03:002009-03-06T22:00:00.000-03:00Oi Fernando.Gostaria de saber, se programas constr...Oi Fernando.<BR/><BR/>Gostaria de saber, se programas construídos baseados em ADS, se compilados novamente podem funcionar numa versão como a 2009.<BR/><BR/>Por outro lado, sabes como fazer rodar o AutoCad R12 Windows no XP.<BR/><BR/>É que desenvolvi anos atrás um aplicativo ainda em ADS, e gostari a de colocá-lo em funcionamento.<BR/>Obrigado.<BR/>NilsonAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-10425945.post-56837080896543496742008-05-10T17:12:00.000-03:002008-05-10T17:12:00.000-03:00Lautaro,I dont think it is possible.You can use .N...Lautaro,<BR/><BR/>I dont think it is possible.<BR/>You can use .NET based languages like C#, VB.NET, F# and proabably J# to create applications but J++ is based on virtual machine, etc.<BR/><BR/>If it communicate with AutoCAD through its COM interface you can virtually use any language you want (this is the idea of COM, a generic language interface).<BR/><BR/>Regards,Fernando Malardhttps://www.blogger.com/profile/09852061806995998594noreply@blogger.comtag:blogger.com,1999:blog-10425945.post-38772511816550253492008-05-10T12:28:00.000-03:002008-05-10T12:28:00.000-03:00Hi Fernando,do you now if it is posible to program...Hi Fernando,<BR/>do you now if it is posible to program with J++ using ObjectARX.<BR/>What is true about this article?<BR/>http://aecnews.com/articles/399.aspx<BR/><BR/>Thanks a lot,<BR/>LautaroLautarohttps://www.blogger.com/profile/05854298554166004739noreply@blogger.comtag:blogger.com,1999:blog-10425945.post-67444853988512468822008-05-05T21:43:00.000-03:002008-05-05T21:43:00.000-03:00Hello Paulo,The Autodesk MAP is a product built on...Hello Paulo,<BR/><BR/>The Autodesk MAP is a product built on the top of AutoCAD using AutoCAD OEM technology.<BR/><BR/>Due that it has two APIs. The first is the standard ObjectARX SDK which is required to access the AutoCAD Core API.<BR/><BR/>Autodesk MAP as some other verticals has its own class set and thus its own API which completes the core API with additional classes as you have discovered.<BR/><BR/>If you need only to use AutoCAD Core API even from inside other verticals you need only standard ObjectARX. In other hand, if you plan to use specific MAP features you will need the standard ObjectARX SDK plus de specific MAP API.<BR/><BR/>My Blog is based on the AutoCAD Core API so all provided code and samples are based on the Core API.<BR/><BR/>Hope I have clarified the scenario.<BR/>BTW, the standard ObjectARX can be downloaded from:<BR/><BR/>http://www.objectarx.com<BR/><BR/>The MAP API can be downloaded here:<BR/><BR/>http://usa.autodesk.com/adsk/servlet/index?siteID=123112&id=868220<BR/><BR/>Regards,<BR/>Fernando MalardFernando Malardhttps://www.blogger.com/profile/09852061806995998594noreply@blogger.comtag:blogger.com,1999:blog-10425945.post-52694803870492720052008-05-05T20:34:00.000-03:002008-05-05T20:34:00.000-03:00Hi Fernando,I looked at the API docs from the Auto...Hi Fernando,<BR/><BR/>I looked at the API docs from the Autocad SDK which I downloaded (Map ObjectARX SDK 2009) and I could not see any of the methods and classes you show in your course (except for the AcDbDatabase - which is not described in the API documentation).<BR/><BR/>The API describes the AcMapSession, AcMapProject, ApMapDrawingSets, and use those mappings to organize objects model. But they does not describe the real drawing objects and commands. <BR/><BR/>You on the other hand, describe the drawing objects and methods (ex. how to add lines in containers and so on), but you use a different approach to manipulate the drawing objects (acdbHostApplicationServices()->workingDatabase()), and I don't know how it relates with the AcMapSession approach. <BR/><BR/>I wonder how the ObjectARX classes described in the SDK API can be used to get to the drawing objects and why you did not use that classes. It seems as if there are two halves of the documentation and each one (you on the one hand and the SDK API on the other) describe one of the halves. <BR/><BR/>Where can I get the whole API? Is it freely available anywhere? Many of the SDK API is described for .NET, but I need all of it for C++ development. As far as the API is concerned, there is an ObjectARX documentation and a GeoSpatial Platform API, but the latter is available for .NET only.<BR/><BR/>Could you (or any one reading this) help me to find the documentation I need?<BR/><BR/>Paulo Crestani.Paulo Crestanihttps://www.blogger.com/profile/01461680271923588517noreply@blogger.comtag:blogger.com,1999:blog-10425945.post-13606101195222811892007-11-10T13:51:00.000-02:002007-11-10T13:51:00.000-02:00You've been kicked (a good thing) - Trackback from...You've been kicked (a good thing) - Trackback from CadKicks.com<BR/><BR/>http://www.cadkicks.com/adkautocad/ObjectARX_DummiesAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-10425945.post-85674653195775094302007-08-28T11:54:00.000-03:002007-08-28T11:54:00.000-03:00Hi Fernando,I solved my problem(Share point) by us...Hi Fernando,<BR/><BR/>I solved my problem(Share point) by using tools from this link<BR/><BR/>http://cadtowin.com/index_files/DownloadArea.html<BR/><BR/>Thank you Again Fernando<BR/><BR/>Regards,<BR/>Your small sister<BR/>Sarah,Anonymousnoreply@blogger.com