Releases: CEXT-Dan/PyRx
Release list
v2.2.63
v2.2.62
v2.2.62
pip install cad-pyrx
- This release mainly tightens up performance, reduces memory copies.
- Use AsWStr over utf8_to_wstr where possible, AsWStr attempts to convert strings on the stack instead or making a copy on the heap.
- added class PyConverter for converting Python objects to C++, the converter attempts to remove unnecessary memory copies.
- improve LayerFilterManager::getFilters returns root, none or root, current
- add Ed.Editor.writeMessage, same a print,
- add Application::refreshMainWindow
Full Changelog: v2.2.61...v2.2.62
v2.2.61
v2.2.61
pip install cad-pyrx
- PyRx is now defaulted to utf8 (utf8_mode = 1;)
- removed the_error, use Python's SDK
PyErr_Print()instead - improve callPyFunction to handle exceptions
@Ap.Command()no longer requires a try catch - add Ed.Editor.selectCrossingPolygon
- add Ed.Editor.selectCrossingWindow
- add db.layerTable shortcut
- add Ed.Editor.zoom(ex)
- add Ed.Editor.zoomExtents()
- add Ed.Editor.zoomWindow(p1, p2)
- add Ed.Editor.zoomCenter(basePoint,5)
- Internal improvements
Full Changelog: v2.2.60...v2.2.61
v2.2.60
v2.2.60
pip install cad-pyrx
- add Document.isActive
- fixed Document.getUserData Document.setUserData, was using curdoc()
- add Document Ap.Document.fromAcadDocument(axdoc)
- add overload to PyApDocument.closeAndSave, with no args uses existing path
- merge refactored module loader from [#523]
- added Ge.Point3dArray.sortByDynamicDistance
- improve std::string PyDbEvalVariant::toString() const
- improve PyLispService.cpp string conversion
v2.2.59
v2.2.59
pip install cad-pyrx
- [#530] Add DocManager::appContextOpenDocument(path, readOnly)
- [#529] Implement Ax.AcadDocument.eq
- [#527] Ap.Application.registerOnIdleWinMsg random order
At part of the port to 3.14, I back ported some items:
Due to changes in Python 3.14’s garbage collection, DBObject’s internal smart pointer now stores a flag if close() has been called. Normally, close() can be called any number of times, but it can be an issue with side databases, there should be no change in behavior from a user perspective, but just in case, I added
void RxObject.setInternalClosed(bool flag) const;
bool RxObject.isInternalClosed() const;Refactor listToResbuf, I found it was a mistake to attempt to handle RTDXF0, this may affect Ed.Core.cmdS function behavior.
Added helper method to open side databases
@staticmethod
def createFromDWG(fullPath: str, closeInput: bool = True, /) -> Database: ...Added Db.DbObjectCloseScope, sample
def scope1():
items_to_close : list[Db.DbObject]= [] # Pre-initialized list container
db = Db.Database(False, True)
db.readDwgFile("M:\\Dev\\Projects\\PyRxGit\\tests\\media\\06457.dwg")
db.closeInput(True)
with Db.DbObjectCloseScope(items_to_close):
for id in db.modelSpace():
ent = Db.Entity(id, Db.OpenMode.ForWrite)
items_to_close.append(ent)
def scope2():
db = Db.Database(False, True)
db.readDwgFile("M:\\Dev\\Projects\\PyRxGit\\tests\\media\\06457.dwg")
db.closeInput(True)
with Db.DbObjectCloseScope() as tx_scope:
for id in db.modelSpace():
ent = Db.Entity(id, Db.OpenMode.ForWrite)
tx_scope.add(ent)Full Changelog: v2.2.58...v2.2.59