Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 12/09/2023 in all areas

  1. As an option, you can do it with one click using HitTest, This is ActiveX, so it should be translatable to Autolisp import traceback import PyRx as Rx import PyGe as Ge import PyGi as Gi import PyDb as Db import PyAp as Ap import PyEd as Ed import AxApp24 as Ax def PyRxCmd_deleterow(): try: axApp = Ax.getApp() axDoc = axApp.ActiveDocument #select the cell but also make a slection fence normal = (0, 0, 1) #z hitPnt = axDoc.Utility.GetPoint("\nSelect cell: ") minmax = hitPnt + axDoc.GetVariable("VSMAX") #select using out new fence axSs = axDoc.SelectionSets.Add("AXTBLSS") axSs.SelectByPolygon(Ax.constants.acSelectionSetFence, minmax, [0], ["ACAD_TABLE"]) #run the hittest for axEnt in axSs: axTable = Ax.IAcadTable(axEnt) hit = axTable.HitTest(hitPnt, normal) if hit[0]: axTable.DeleteRows(hit[1],1) except Exception as err: traceback.print_exception(err) finally: axSs.Delete()
    1 point
  2. Try this select attributes. Did something similar yesterday so code was there. ; https://www.cadtutor.net/forum/topic/65971-copy-attribute-value-between-two-blocks-different-tags/ (defun C:att2 (/ obj objID area hname content units) (setq obj (vlax-ename->vla-object (car (nentsel "\nSelect attribute ")))) (setq objID (rtos (vla-get-objectid obj) 2 0)) (setq atname (strcat "%<\\AcObjProp Object(%<\\_ObjId " objID ">%).Textstring>%")) (setq obj (vlax-ename->vla-object (car (nentsel "\nSelect attribute 2 ")))) (vlax-put obj 'Textstring atname) (princ) )
    1 point
  3. Lee-mac has a Hit-test that returns the cell address of a table. Have a look for it. (setq obj (vlax-ename->vla-object (car (entsel "Pick table obj")))) (vla-DeleteRows obj 3 1) ; row how many (vla-put-regeneratetablesuppressed obj :vlax-false) ; regen tablea
    1 point
  4. Something went wrong with paste code did not update properly, have a look at version above has the complex sort.
    1 point
  5. Probably.. but fields arn't my thing, someone else might know this one
    1 point
×
×
  • Create New...