- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
So I used ChatGPT to write me a LISP code. I want to be able to select any object in my model space and have the LISP give the name of the paper space in which it is being viewed. For example, if I have an object (line, block, hatch, etc.), and that object is being viewed in a viewport--even when 3 or 4 viewports are in a paper space--and the paper space name is S1, I want the LISP to give me "S1". Or even if the object is being viewed in multiple paper spaces at the same time, for example, I would like it to give me the paper space names (e.g. S1, SH2, M3.5, etc...).
Here are some errors GPT gave me, but it seems it's having trouble fixing them:
- Viewport Clipping: If the viewport is clipped or if its scale affects the visible area, the bounding box of the viewport may not correspond to what you see in the drawing.
- Coordinate Space Mismatch: The bounding box of the object is in model space, while the viewport may need to be considered in paper space. We need to make sure that the viewport coordinates are being interpreted correctly.
I attached the LISP, but I always get the "No viewport contains the selected object." despite selecting an object that is clearly in a viewport.
Solved! Go to Solution.