tricon77 Posted June 13, 2024 Posted June 13, 2024 I am trying to get this little script to end after the trim command. The object for the entsel is a block. Is there a way to insert the escape key? I am going to build on top of this after it is solved. The end goal is to select many blocks which are squares and the insertion point is in the center. I want to trim the line which is under the insertion point of the block. (progn (command "zoom" "obj" (setq ss (car (entsel))) "" "trim" (cdr (assoc 10 (entget ss))) )) Quote
CyberAngel Posted June 13, 2024 Posted June 13, 2024 I tried to reproduce this script the way I thought it should run. I got the error "Cannot TRIM this object" because there was nothing to trim. Either I don't understand what you're trying to do, or there's some key information missing. How does the code know what to trim? How do you know the line passes through the insertion point? What does the escape key accomplish and where should it happen? Have you tried using two different command sequences? Have you tried running the script one line at a time in a drawing? Please help us to help you. Quote
tricon77 Posted June 13, 2024 Author Posted June 13, 2024 (progn (command "zoom" "obj" (setq ss (car (entsel))) "" "trim" (cdr (assoc 10 (entget ss))) )) I have add an attachment to help with the debugging. The command above will prompt to pick an object. You should pick the square block. After picking the script zooms into the block. At this point, the pick is saved in variable ss. the "trim" command is started and the pick point is the insertion point of the block. (I am assuming the insert point is on the line) The line gets trim but stays in trim command. I would like to end the trim command and do a zoom previous. Let me know if you need more info, Thanks demo.dwg Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.