Skip to content
Discussion options

You must be logged in to vote

Right selectByPolygon acSelectionSetFence is now selectFence

As you have noticed points and vectors are now typed as AcGePoint3d and AcVector3d, as well as AcGeMatrix3d. I would cringe every time I saw VBA code doing manual transformations.

Here’s a sample selecting a table by point

import traceback
from pyrx import Ap, Ax, Ge


def selectTableByPoint(hitPnt: Ge.Point3d, axDoc: Ax.AcadDocument):
    try:
        # compute max using a vector
        max = hitPnt + (axDoc.getVariable("VSMAX") - hitPnt)
        axSets = axDoc.selectionSets()
        axSs = axSets.add("AXTBLSS")
        
        # filters like [0], ["ACAD_TABLE"] are combined, use a list of tuples 
        # list like in Lisp…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@kwollaston
Comment options

Answer selected by kwollaston
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants