Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 08/19/2025 in all areas

  1. With ARX, you can use Brep or AssocPersSubentIdPE, the later is a bit simpler to use. AssocPersSubentIdPE will get you the faces, edges, and vertices of the solid. In the case of a cuboid, simply get all the edges and map them to a vertex In this example each vertex should be mapped to three edges. You could then build a transformation matrix so you can accurately compute the dimensions. It starts to get a lot harder with more complex shapes. There’s a few threads at the swamp discussing ideas how to work with I-beams, how to find the edge the run along the length for reference import traceback from pyrx import Ap, Ax, Ge, Ed, Db, command from collections import defaultdict @command def doit(): ps, id, pnt = Ed.Editor.entSel("\nPick it: \n", Db.Solid3d.desc()) solid = Db.Solid3d(id) pe = Db.AssocPersSubentIdPE(solid.queryX(Db.AssocPersSubentIdPE.desc())) edge_map = defaultdict(list[Ge.Curve3d]) for vrt in pe.getAllSubentities(solid, Db.SubentType.kVertexSubentType): edge_map[pe.getVertexSubentityGeometry(solid, vrt)] for edge in pe.getAllSubentities(solid, Db.SubentType.kEdgeSubentType): crv = pe.getEdgeSubentityGeometry(solid, edge) edge_map[crv.getStartPoint()].append(crv) edge_map[crv.getEndPoint()].append(crv) for k, v in edge_map.items(): for _crv in v: Ed.Core.grDraw(_crv.getStartPoint(), _crv.getEndPoint(), 1, 0) return
    1 point
  2. With AutoCAD LT not running, open Windows REGEDIT and navigate to: HKEY_CURRENT_USER\Software\Autodesk\AutoCAD\Rxx.x\ACAD-xxxx:xxx\Profiles\**your profile name**\Drawing Recovery (items in blue may vary) Then look in the subfolder named "Unresolved", you should find the file names of these files. I deleted all entries in this folder and fired up AutoCAD and the DrawingRecovery list is empty.
    1 point
  3. Have a play with this (defun c:foo ( / s e ) (princ "\n Pick on one line to get its length :") (if (setq s (ssget "_+.:S:E" '((0 . "LINE")))) (princ (strcat "\n Total Length is : " (rtos (distance (cdr (assoc 10 (setq e (entget (ssname s 0))))) (cdr (assoc 11 e))) 2))) ) (princ) )
    1 point
×
×
  • Create New...