Jump to content

Script to select an area and create a block


Recommended Posts

Hello everyone,

I need help with a script I've been working on that involves creating blocks.

I've already developed a script that draws circles of varying sizes at predetermined points on the drawing. Additionally, I've written another script that selects the area of each circle and converts it into a block, with the center of the circle as the base point and a predefined name for the block. However, when I run the script, the selection of the area isn't precise, and it often freezes after a short period. I'm having trouble understanding the cause of this issue. Could someone please lend a hand?

block creation (not working).scr circle creation(working).scr

Link to comment
Share on other sites

I managed to make it work by expanding the space between each circle and then modifying the block creation formula. Since the selection wasn't precise when the objects were small, despite having coordinates, I added the -PAN function to move the viewport for each circle, and it worked correctly.

Block creation (Working).scr

Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...