Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 06/20/2025 in all areas

  1. [Advanced] Use a point monitor to add items to the hover tooltip import traceback from pyrx import Rx, Ge, Gi, Db, Ap, Ed print("added command pymon") print("added command pyunmon") # Adds the monitors to the application def OnPyInitApp(): PyRxCmd_pymon() def OnPyUnloadApp(): PyRxCmd_pyunmon() # https://help.autodesk.com/view/OARX/2025/ENU/?guid=GUID-BBDA79D3-A509-4C96-966E-72592BD32ACD class MyPointMonitor(Ed.InputPointMonitor): def __init__(self): Ed.InputPointMonitor.__init__(self) def monitorInputPoint(self, input: Ed.InputPoint, output: Ed.InputPointMonitorResult): try: ents = input.pickedEntities() geo: Gi.Geometry = input.drawContext().geometry() if len(ents) == 0: geo.text(input.rawPoint(), Ge.Vector3d.kZAxis, Ge.Vector3d.kXAxis, 10.0, 1.0, 0, "Cold") output.setAdditionalTooltipString("COLD") else: geo.text(input.rawPoint(), Ge.Vector3d.kZAxis, Ge.Vector3d.kXAxis, 10.0, 1.0, 0, "Hot") output.setAdditionalTooltipString("HOT") except Exception as err: print(err) # global space pm = MyPointMonitor() def PyRxCmd_pymon(): try: manager = Ap.curDoc().inputPointManager() manager.addPointMonitor(pm) except Exception as err: print(err) def PyRxCmd_pyunmon(): try: manager = Ap.curDoc().inputPointManager() manager.removePointMonitor(pm) except Exception as err: print(err) Screen Recording 2025-06-20 102115.mp4
    2 points
  2. I guess using GRREAD to pick a point in real time and behind the scenes do a search box looking for text and in particular a match say "ABC" in "ABCDEFGH" if yes then zoom in on that text. I am not good at GRREAD code so some one else may be able to help. Search box.part based on a pick point. (setq off 18) ; needs to be changed to suit a dwg. (while (setq pt (getpoint "\nPick point ")) (setq pt1 (polar pt (* 0.25 pi) off)) (setq pt2 (polar pt (* 0.75 pi) off)) (setq pt3(polar pt (* 1.25 pi) off)) (setq pt4 (polar pt (* 1.75 pi) off)) (setq pts (list pt1 pt2 pt3 pt4 pt1)) (setq ss (ssget "CP" pts '((0 . "TEXT")))) (if (= ss nil) (princ "\n nothing found ") (princ (strcat "\n" (cdr (assoc 1 (entget (ssname ss 0)))) " found")) ) )
    2 points
  3. Open View Manager. Select Preset Views from the dropdown menu. Then select one of the four 3D isometric views: SW, SE, NE or NW. Done.
    1 point
  4. Not lisp, One approach would be to use a point monitor https://www.cadtutor.net/forum/topic/98349-use-a-point-monitor-to-add-items-to-the-hover-tooltip/ A draw jig might be also work depending on the context.
    1 point
  5. This might be a starting point https://www.lee-mac.com/grtext.html combine BIGAL and demo one?
    1 point
  6. Your ratio rectangle should look similar to what is shown on the far left. What is shown on the right is how it is derived.
    1 point
  7. Ok a few issues I joined all the plines into one else code fails. The code uses a very simple method of working out connection point, the issue is when a join is just past a vertice then angel will not be 45 so need a different approach. In this image can see the 2 answers as the 45 line meets either before or after a vertice so it would make sense at the vertice there is a PIT for change of direction of the pipe so use that point. Can you comment please. Something to play with. (defun c:gully45 ( / ) (setq obj2 (vlax-ename->vla-object (car (entsel "\nPick drain line ")))) (while (setq ent (car (entsel "\nPick block object "))) (setq obj1 (vlax-ename->vla-object ent)) (setq inspt (vlax-get obj1 'insertionpoint)) (setq objpt (vlax-curve-getclosestpointto obj2 inspt)) (setq dist (distance inspt objpt)) (setq dist2 (vlax-curve-getdistatpoint obj2 objpt)) (setq dist2 (+ dist2 dist)) (setq pt2 (vlax-curve-getpointatdist obj2 dist2)) (command "line" inspt pt2 "") ) (princ) ) (c:gully45)
    1 point
×
×
  • Create New...