This is Alexander Rivilis's Typepad Profile.
Join Typepad and start following Alexander Rivilis's activity
Join Now!
Already a member? Sign In
Alexander Rivilis
Graduated from the Lobachevsky University of the city of Gorky (now Nizhny Novgorod, Russia), the radiophysics department (specialized in quantum radiophysics). Work in the MAESTRO Group (Kiev, Ukraine).Have been member of the Autodesk Developer Network since 1999. I am a programmer, one of the developers of the MAESTRO system. Besides work at my spare time I teach ObjectARX in the Moscow CAD & GIS Academy.
Recent Activity
And what about LIVESECTION was turned on and I need only change color of Intersection Fill?
Excellent!
Toggle Commented Oct 17, 2019 on The Property Inspector in depth at AutoCAD DevBlog
Oops! Now I can download it. Look like it was a temporary problem.
Dear Philippe! File https://adndevblog.typepad.com/adnassocconstraintapi-1.zip is not found. Please re-upload it.
Thank you, Madhukar! That is my port to AutoCAD .NET API: [code] using System; using Autodesk.AutoCAD.Runtime; using Autodesk.AutoCAD.ApplicationServices; using Autodesk.AutoCAD.DatabaseServices; using Autodesk.AutoCAD.Geometry; using Autodesk.AutoCAD.EditorInput; // This line is not mandatory, but improves loading performances [assembly: CommandClass(typeof(Rivilis.XrefLongTrans))] namespace Rivilis { public class XrefLongTrans { enum EditInPlaceXrefState { Discarded, Saved }; static EditInPlaceXrefState state = EditInPlaceXrefState.Discarded; [CommandMethod("WatchXref")] public void WatchXref() { Document doc = Application.DocumentManager.MdiActiveDocument; if (doc == null) return; Editor ed = doc.Editor; LongTransactionManager longTranMan = Application.LongTransactionManager; longTranMan.CheckedIn += TrMan_CheckedIn; longTranMan.Aborted += TrMan_Aborted; doc.CommandEnded += Doc_CommandEnded; } [CommandMethod("UnWatchXref")] public void UnWatchXref() { Document doc = Application.DocumentManager.MdiActiveDocument; if (doc == null) return; Editor ed = doc.Editor; LongTransactionManager longTranMan = Application.LongTransactionManager; longTranMan.CheckedIn -= TrMan_CheckedIn; longTranMan.Aborted -= TrMan_Aborted; doc.CommandEnded -= Doc_CommandEnded; } private void TrMan_Aborted(object sender, LongTransactionEventArgs e) { Document doc = Application.DocumentManager.MdiActiveDocument; if (doc == null) return; Editor ed = doc.Editor; if (e.Transaction.Type == LongTransactionType.XRefDb) { ed.WriteMessage("\nLong transaction {0} aborted\n", e.Transaction.LongTransactionName); state = EditInPlaceXrefState.Discarded; } } private void TrMan_CheckedIn(object sender, LongTransactionEventArgs e) { Document doc = Application.DocumentManager.MdiActiveDocument; if (doc == null) return; Editor ed = doc.Editor; if (e.Transaction.Type == LongTransactionType.XRefDb) { ed.WriteMessage("\nLong transaction {0} commited\n", e.Transaction.LongTransactionName); state = EditInPlaceXrefState.Saved; } } private void Doc_CommandEnded(object sender, CommandEventArgs e) { if (e.GlobalCommandName.ToUpper() == "REFCLOSE") { Document doc = Application.DocumentManager.MdiActiveDocument; if (doc == null) return; Editor ed = doc.Editor; ed.WriteMessage("\nModification of XREF {0}\n", (state == EditInPlaceXrefState.Saved) ? "Saved": "Discarded"); } } } } [/code]
Also ObjectARX Wizard 2019 do unusable ObjectARX Wizard 2017 and 2018. It is very bad news. I have to restore both ObjectARX Wizards manually :(
File: "C:\Program Files (x86)\Autodesk\ObjectARX 2019 Wizards\ArxWizMFCSupport\HTML\1033\default.htm" Line 11 have to be commented (or deleted). Otherwise dialog is wrong and impossible press Finish button.
Other bug: File: "C:\Program Files (x86)\Autodesk\ObjectARX 2019 Wizards\ArxWizMFCSupport\HTML\1033\default.htm" In line 336 have to be changed CLASSID to "CLSID:fc1ae18b-0282-42f1-90ae-bbd8f0181013"
Hi Deepak! You forgot disable compile option: Smaller type check in debug configuration.
Yes! I have ObjectARX SDK 2018 from Autodesk website (not beta). File rxsdk_common.props has such line: _WIN32_IE=0x0600;WIN;WIN32;_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES=1;_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT=1;_AFXDLL;_UNICODE;UNICODE;%(PreprocessorDefinitions) There is no others preprocessor definitions. So it is look like best offer - download and install the latest version of the ObjectARX SDK 2018 from Autodesk website: http://usa.autodesk.com/adsk/servlet/item?siteID=123112&id=785550
Hi, Madhukar! I've checked my ObjectARXSDK 2018\inc\rxsdk_common.props but did not found _CRT_STDIO_ISO_WIDE_SPECIFIERS definition in it. What wrong with my ObjectARX SDK 2018? Best Regads, Alexander Rivilis
Dear Virupaksha Aithal! You wrote: "It is required to remove corresponding PDF underlay references from the drawing". But in your's code there are not any removing of PDFReference's (e.g. pdfref.Erase() ). Only "regen" of PDFReference's. As far as I see it is enough in order to hide it in drawing: http://autode.sk/2axfW7G
Toggle Commented Jul 21, 2016 on Unload all the PDF underlay at AutoCAD DevBlog
>>>Developing Environment for AutoCAD \OEM 2017 is Visual Studio 2017.<<< I think this is a typo and AutoCAD OEM 2017 require Visual Studio 2015.
P.S.: I've tested this code and find that AutoCAD check this variable from registry every time. So for this variable it is a quite well solution. Thanks!
Toggle Commented Feb 13, 2016 on Change Profile settings from .NET at AutoCAD DevBlog
Hi Adam! As far as I remember AutoCAD read changed registry variables only after it restart (next session) unlike of getenv/setenv. So it is not ideal solution.
Toggle Commented Feb 13, 2016 on Change Profile settings from .NET at AutoCAD DevBlog
Dear Augusto! Another typos: privatestaticexternvoid staticpublicvoid ;)
[code] static void RemExtDict () { Acad::ErrorStatus es; ads_name en; ads_point p; if (acedEntSel(_T("\nSelect Entity with ExtDictionary: "),en,p) != RTNORM) return; AcDbObjectId eId; acdbGetObjectId(eId, en); AcDbEntityPointer pEnt(eId, AcDb::kForRead); if (pEnt.openStatus() == Acad::eOk) { AcDbObjectId idExtDict = pEnt->extensionDictionary(); if (idExtDict.isNull() || idExtDict.isErased()) { acutPrintf(_T("\nEntity has not Extension Dictionary!")); return; } { AcDbDictionaryPointer pDict(idExtDict, AcDb::kForWrite); if (pDict.openStatus() == Acad::eOk) { AcDbObjectIdArray ids; ids.setPhysicalLength(pDict->numEntries()+1); AcDbDictionaryIterator *pIter = pDict->newIterator(); for (; !pIter->done(); pIter->next()) { ids.append(pIter->objectId()); } delete pIter; for (int i = 0; i < ids.length(); i++) { pDict->remove(ids[i]); } } } if (pEnt->upgradeOpen() == Acad::eOk) { es = pEnt->releaseExtensionDictionary(); if (es != Acad::eOk) { acutPrintf(_T("\nError releaseExtensionDictionary() = %s"), acadErrorStatusText(es)); } } } } [/code]
Both dictionary and xrecord has not appname. What do you mean?
My solution: {code} using System; using Autodesk.AutoCAD.Runtime; using Autodesk.AutoCAD.ApplicationServices; using Autodesk.AutoCAD.EditorInput; [assembly: CommandClass(typeof(Rivilis.BEdit))] namespace Rivilis { public class BEdit { [CommandMethod("TestBEDIT")] public void TestBEdit() { Document doc = Application.DocumentManager.MdiActiveDocument; Editor ed; if (doc != null) { ed = doc.Editor; if (Autodesk.AutoCAD.Internal.AcAeUtilities.IsInBlockEditor()) { ed.WriteMessage("\nWe are in block editor of block \"{0}\"", Autodesk.AutoCAD.Internal.AcAeUtilities.GetBlockName()); } else { ed.WriteMessage("\nWe are NOT in block editor"); } } } } } {/code}
Only ObjectARX 2015 and 2016 have method AcApDocument::getDwgVersionFromSaveFormat
Toggle Commented Jun 23, 2015 on How to Get Default Drawing Format at AutoCAD DevBlog
Russian translation of this post and C# sample: http://adn-cis.org/programmnaya-imitacziya-komandyi-burst.html
Hi Balaji! File arxdragdrop.ilk completely superfluous but has size >1Mb
Hi Augusto! You did the simple typo in your's post. Instead of DBText have to be MText.
Toggle Commented Apr 23, 2015 on Simple drawable overrule skeleton at AutoCAD DevBlog
It is impossible to assign LineWeight to temp line drawn with acedGrDraw / acedGrVecs, but you can offset temp line left and right with value from 0 to Width with appropriate step.
Toggle Commented Mar 19, 2015 on Temporary graphics in AutoCAD at AutoCAD DevBlog
Also you can check this code: http://adn-cis.org/forum/index.php?topic=59.msg4561#msg4561