tag:blogger.com,1999:blog-10425945.post8933771476885184275..comments2024-03-14T18:15:27.812-03:00Comments on ObjectARX & Dummies: Version ControlFernando Malardhttp://www.blogger.com/profile/09852061806995998594noreply@blogger.comBlogger8125tag:blogger.com,1999:blog-10425945.post-78191246873597940512008-04-23T16:21:00.000-03:002008-04-23T16:21:00.000-03:00Hi Spencer,There is no native way to reproduce PED...Hi Spencer,<BR/><BR/>There is no native way to reproduce PEDIT command.<BR/><BR/>I would recommend you to test your command into a simple command which only ask the user to select the entities and then apply the command. <BR/><BR/>If the command is failing there must be something wrong with entities states (as you said) or maybe they are not connected curves.<BR/><BR/>Sorry about that.<BR/>Regards,Fernando Malardhttps://www.blogger.com/profile/09852061806995998594noreply@blogger.comtag:blogger.com,1999:blog-10425945.post-88878662411527748012008-04-23T15:33:00.000-03:002008-04-23T15:33:00.000-03:00Hi, Fernando,sorry to bother you again!I have a pi...Hi, Fernando,sorry to bother you again!<BR/><BR/>I have a pile of lines and arcs(I don't know the sequence), which can be joined into a valid lwpolyline, I use code as this:<BR/><BR/>rc=ads_command(RTSTR,_T(".pedit"),RTSTR, _T("M"),RTPICKS,ssname,RTSTR,_T(""),<BR/> RTSTR,_T("y"),RTSTR,_T("j"),RTSTR,_T(""),<BR/> //RTSTR,_T("w"),RTREAL,thickwid,<BR/> RTSTR,"",RTNONE);<BR/><BR/> but it doesn't work sometimes,(maybe when there's some entity opened for write already)<BR/><BR/>so, my question is: Do you know why the "pedit"command failed? Can I use arx code to join these lines and arcs into a whole polyline( I don't know their sequence)?How?Any example?<BR/>Thank you in advance!Unknownhttps://www.blogger.com/profile/16075197057361984192noreply@blogger.comtag:blogger.com,1999:blog-10425945.post-83911207723624005502008-04-20T11:47:00.000-03:002008-04-20T11:47:00.000-03:00I'll try, hope it'll work. Thank you for your kind...I'll try, hope it'll work. Thank you for your kind help!!! Thank you very much!!!Unknownhttps://www.blogger.com/profile/16075197057361984192noreply@blogger.comtag:blogger.com,1999:blog-10425945.post-27933030712696972492008-04-20T10:27:00.000-03:002008-04-20T10:27:00.000-03:00BTW, don`t forget the _T() macro:ads_queueexpr(_T(...BTW, don`t forget the _T() macro:<BR/><BR/>ads_queueexpr(_T("(command \"_.undefine\" \"offset\")"));Fernando Malardhttps://www.blogger.com/profile/09852061806995998594noreply@blogger.comtag:blogger.com,1999:blog-10425945.post-38625162790104461512008-04-20T10:25:00.000-03:002008-04-20T10:25:00.000-03:00Hi Spencer,You can do that using UNDEFINE command....Hi Spencer,<BR/><BR/>You can do that using UNDEFINE command. Inside your acrxEntryPoint() callback for kLoadDwgMsg message, add this:<BR/><BR/>ads_queueexpr( "(command \"_.undefine\" \"offset\")");<BR/><BR/>The ads_queueexpr() is an undocumented function which sends a command but through a queue avoiding document state problems.<BR/><BR/>Remember that even undefining a native command it will be still available from its DOT version ".offset".<BR/><BR/>Have you reconsidered deriving from AcDbCurve? I think this would be the most secure way to go and you will not need to handle each way the user can interact with OFFSET command.<BR/><BR/>Regards,Fernando Malardhttps://www.blogger.com/profile/09852061806995998594noreply@blogger.comtag:blogger.com,1999:blog-10425945.post-19265293320104453362008-04-20T01:12:00.000-03:002008-04-20T01:12:00.000-03:00Thanks for your reply! But can you give me more in...Thanks for your reply! But can you give me more information about how to "redefine the native OFFSET command "? I searched your articles and failed to find any stuff. And any sample? Thank you very much again!Unknownhttps://www.blogger.com/profile/16075197057361984192noreply@blogger.comtag:blogger.com,1999:blog-10425945.post-25895869491228531212008-04-19T15:37:00.000-03:002008-04-19T15:37:00.000-03:00Hi Spencer,Maybe the most straight forward method ...Hi Spencer,<BR/><BR/>Maybe the most straight forward method would be redefine the native OFFSET command and implement yours.<BR/><BR/>The idea is to reproduce the OFFSET command flow and before apply the modification you can test if the entity is one of those you are interested or not.<BR/><BR/>If it is, use your own function if not, check if it is derived from AcDbCurve and call getOffsetCurves() by yourself.<BR/><BR/>I think this is simple and it will work. Of course this requires that your ARX is up and running inside the target computer.<BR/><BR/>Best regards,Fernando Malardhttps://www.blogger.com/profile/09852061806995998594noreply@blogger.comtag:blogger.com,1999:blog-10425945.post-90109323131824868182008-04-19T11:44:00.000-03:002008-04-19T11:44:00.000-03:00Hi,Fernando,Thank you very much! Your articles tea...Hi,Fernando,Thank you very much! Your articles teached me a lot. Can you just help me one question whitch torchured me very much: I have a customed entity, if the user input the "OFFSET" command, I'd like to use my own offset instead of the native one, using "commandWillStart" of AcEditorReactor, I can know wheather he input "OFFSET" or not , but how can I prevent it, or block it when the user use offset command on my entity, and leave it alone while other entities? And how can I apply my own offset function? The customed entity is not derived from AcDbCurve, so overriding getOffsetCurves().... will not work, I tried it many times. Can you give me some advise, or just a simple sample? Thank you very very much!!!Unknownhttps://www.blogger.com/profile/16075197057361984192noreply@blogger.com