Dynamic Blocks Forum

Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

This page has been translated for your convenience with an automatic translation service. This is not an official translation and may contain errors and inaccurate translations. Autodesk does not warrant, either expressly or implied, the accuracy, reliability or completeness of the information translated by the machine translation service and will not be liable for damages or losses caused by the trust placed in the translation service.
Translate

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

Message 1 of 11

09-27-2024
02:58 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report

Keep object inside dynamic rectangle

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report

I am working on a dynamic workstation for a manufacturing layout. I have a circle inside of a rectangle. The rectangle is the workstation, the circle is where the airline connection will be.

I've made the rectangle dynamic to be able to scale it in the x and y directions. I want to be able to reposition the airline connection anywhere within the table. The problem i am running into is limiting the movement of the circle to keep it inside of my rectangle.

Ive attached what i have currently.

09-27-2024
02:58 AM

Keep object inside dynamic rectangle

I am working on a dynamic workstation for a manufacturing layout. I have a circle inside of a rectangle. The rectangle is the workstation, the circle is where the airline connection will be.

I've made the rectangle dynamic to be able to scale it in the x and y directions. I want to be able to reposition the airline connection anywhere within the table. The problem i am running into is limiting the movement of the circle to keep it inside of my rectangle.

Ive attached what i have currently.

10 REPLIES 10

Message 2 of 11

09-27-2024
03:36 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report

Constraints and parameters don't mix very well. I don't have full AutoCAD, but below is a screenshot of how I would try and go about it using dimensional constraints

**Howard Walker**

Did you find this post helpful? Feel free to Like this post.

Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

09-27-2024
03:36 AM

Constraints and parameters don't mix very well. I don't have full AutoCAD, but below is a screenshot of how I would try and go about it using dimensional constraints

**Howard Walker**

Did you find this post helpful? Feel free to Like this post.

Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

Message 3 of 11

09-27-2024
10:16 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report

I am not sure i understand how to implement what you have shown. How do i get the max width to subtract the diameter?

09-27-2024
10:16 AM

Message 4 of 11

09-27-2024
10:17 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report

09-27-2024
10:17 AM

Message 5 of 11

09-30-2024
01:26 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report

@jbadgleyU8XVA See the link below

AutoCAD 2022 Help | About Parametric Drawing and Constraints | Autodesk

**Howard Walker**

Did you find this post helpful? Feel free to Like this post.

Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

09-30-2024
01:26 AM

@jbadgleyU8XVA See the link below

AutoCAD 2022 Help | About Parametric Drawing and Constraints | Autodesk

**Howard Walker**

Did you find this post helpful? Feel free to Like this post.

Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

Message 6 of 11

09-30-2024
02:24 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report

I can only get it to constrain the circle to a point, it doesn't allow a range of movement.

09-30-2024
02:24 AM

I can only get it to constrain the circle to a point, it doesn't allow a range of movement.

Message 7 of 11

09-30-2024
04:53 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report

@j.palmeL29YX Do you think you could help out. I don't have full AutoCAD

**Howard Walker**

Did you find this post helpful? Feel free to Like this post.

Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

09-30-2024
04:53 AM

@j.palmeL29YX Do you think you could help out. I don't have full AutoCAD

**Howard Walker**

Did you find this post helpful? Feel free to Like this post.

Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

Message 8 of 11

09-30-2024
10:13 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report

I assume @h_s_walker refers to a solution similar to the one shown here.

You are welcome to test this block, but

- it is not very stable,

- it is sometimes awkward to use

- it “provokes” a lot of new problems

- in general, dynamic blocks with constraints have some serious disadvantages

=>

I would not recommend such a solution. (but unfortunately I don't know of a better one)

**Jürgen Palme**

Did you find this post helpful? Feel free to Like this post.

Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

09-30-2024
10:13 AM

I assume @h_s_walker refers to a solution similar to the one shown here.

You are welcome to test this block, but

- it is not very stable,

- it is sometimes awkward to use

- it “provokes” a lot of new problems

- in general, dynamic blocks with constraints have some serious disadvantages

=>

I would not recommend such a solution. (but unfortunately I don't know of a better one)

**Jürgen Palme**

Did you find this post helpful? Feel free to Like this post.

Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

Message 9 of 11

09-30-2024
10:50 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report

I think I would approach this visually by making a non-plotting rectangle within the perimeter of the work area that designates the limit and include it with the stretch actions. Then you can visually see if you're placing it beyond the limits, and even snap to the limit if needed.

Having it move automatically with a constraints setup might not give you the behavior you want all the time. For instance, you may want to make the work area wider but keep the electric and air in the same location. If they move with the width changes you'll need to move them back each time. That may not be desirable.

Also, consider making your parameters 'incremental' such that your actions will only move to exact increments vs random values. (my inner ocd is showing)

Addition: Interesting behavior I just noticed. You can hold down the Shift key and select both the point parameter grip and the width, or height, grip and they'll move together. This would give you the option to choose when the elec/air locations move with the height/width change.

09-30-2024
10:50 AM

I think I would approach this visually by making a non-plotting rectangle within the perimeter of the work area that designates the limit and include it with the stretch actions. Then you can visually see if you're placing it beyond the limits, and even snap to the limit if needed.

Having it move automatically with a constraints setup might not give you the behavior you want all the time. For instance, you may want to make the work area wider but keep the electric and air in the same location. If they move with the width changes you'll need to move them back each time. That may not be desirable.

Also, consider making your parameters 'incremental' such that your actions will only move to exact increments vs random values. (my inner ocd is showing)

Addition: Interesting behavior I just noticed. You can hold down the Shift key and select both the point parameter grip and the width, or height, grip and they'll move together. This would give you the option to choose when the elec/air locations move with the height/width change.

Message 10 of 11

10-01-2024
02:19 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report

Thank you for the solution you provided. It is a little buggy with moving things around, however it does accomplish what i am trying to do. It also helps me understand the parameter syntax better.

Do you know if you can enter a formula in the "Dist maximum" Property box? I added a picture to help clarify which box I'm talking about.

My first thought was to have my rectangle independent from the circle, set up as a normal dynamic rectangle. Then using a horizontal distance constraint I would setting the Dist min to 0 and the Dist maximum be equal to the length parameter of the rectangle. The same set up for the vertical constraint except the Dist maximum would be the rectangle width.

10-01-2024
02:19 AM

Thank you for the solution you provided. It is a little buggy with moving things around, however it does accomplish what i am trying to do. It also helps me understand the parameter syntax better.

Do you know if you can enter a formula in the "Dist maximum" Property box? I added a picture to help clarify which box I'm talking about.

My first thought was to have my rectangle independent from the circle, set up as a normal dynamic rectangle. Then using a horizontal distance constraint I would setting the Dist min to 0 and the Dist maximum be equal to the length parameter of the rectangle. The same set up for the vertical constraint except the Dist maximum would be the rectangle width.

Message 11 of 11

10-01-2024
11:15 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report

@jbadgleyU8XVA wrote:

Do you know if you can enter a formula in the "Dist maximum" Property box?

AFAIK only numerical values are allowed.

(the ability to use parameters in the property panel is one of my long whishes.)

@jbadgleyU8XVA wrote:

It is a little buggy with moving things around,

I know.

Unfortunately constraints don't know an equivalent to the Point Parameter with an assoziated Move Action. My work around is the use of a vertical and a horizontal dimensional constraint on the same point. The problem - when you pick at this point AutoCAD decides sometimes to grab the horizontal, soemtimes the vertical and sometimes if you are in luck) both together (that is what we need). Therefore I wrote above "it is sometimes awkward to use". 😉

**Jürgen Palme**

Did you find this post helpful? Feel free to Like this post.

Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

10-01-2024
11:15 AM

@jbadgleyU8XVA wrote:

Do you know if you can enter a formula in the "Dist maximum" Property box?

AFAIK only numerical values are allowed.

(the ability to use parameters in the property panel is one of my long whishes.)

@jbadgleyU8XVA wrote:

It is a little buggy with moving things around,

I know.

Unfortunately constraints don't know an equivalent to the Point Parameter with an assoziated Move Action. My work around is the use of a vertical and a horizontal dimensional constraint on the same point. The problem - when you pick at this point AutoCAD decides sometimes to grab the horizontal, soemtimes the vertical and sometimes if you are in luck) both together (that is what we need). Therefore I wrote above "it is sometimes awkward to use". 😉

**Jürgen Palme**

Did you find this post helpful? Feel free to Like this post.

Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

Can't find what you're looking for? Ask the community or share your knowledge.