Having trouble with Dynamic Blocks with Constraints and properties.

Having trouble with Dynamic Blocks with Constraints and properties.

sonny3g
Collaborator Collaborator
715 Views
3 Replies
Message 1 of 4

Having trouble with Dynamic Blocks with Constraints and properties.

sonny3g
Collaborator
Collaborator

I have posted before about this issue.  I have several hundred blocks that combine dynamic properties and constraints.  These blocks are supports that have to be able to adjust to custom heights and rotate a mounting head as needed.  Initially, the block inserts where the head mounts to a conveyor and the user drags a grip at the bottom of the support to the floor, then rotates the head with a grip if required.  Not all support heads need to be rotated.

 

The problem has been that using both constraints and dynamic properties cause copies of the support to make changes to all instances of that block when the user makes a change to any one of them.  If I restrict my block to just one constraint and as many dynamic properties as needed (the simplest block has at least two dynamic properties and the most complex has nearly 70) the problem goes away.  If I restrict the number of dynamic properties to one (rotate the support head) and use constraints in the place of the remaining dynamic properties, the block works correctly manually.

 

My program is trying to have the user pick the insertion point on a conveyor, a point at floor level, calculate the height and select the correct support, insert the block at the insertion point on the conveyor and stretch the bottom of the support down to the floor.  This works when I use dynamic properties for the length of the support.  But, the blocks require more than one constraint to maintain placement and positioning when the head is rotated.

So, I have to use more than one constraint to be able to accurately use these blocks.  Is there a way to apply the same action of stretching the support to the floor on a constraint as I am able to do when it is a dynamic property programmatically?

 

I am attaching two blocks, one with all dynamic and constraint properties and one with only one dynamic property and all required constraints.

 

I am working with AutoCAD 2016 using LISP to insert and change the blocks properties but I am also in the process of trying to figure out how to do this with C#.

 

Any help is appreciated.

Scott G. Sawdy
scott.sawdy@bluecoyotecad.com
0 Likes
716 Views
3 Replies
Replies (3)
Message 2 of 4

sonny3g
Collaborator
Collaborator

The real question I have right now is if it is even possible?

Scott G. Sawdy
scott.sawdy@bluecoyotecad.com
0 Likes
Message 3 of 4

SRSDS
Advisor
Advisor

I read somewhere that it's not a good idea to mix dynamic properties with constraints.

Use dimensional constraints rather than dynamic properties. They do the same thing.

 

 

0 Likes
Message 4 of 4

sonny3g
Collaborator
Collaborator

I have tried to do that but cannot figure out how to get the same results from the blocks using only constraints as I get with using properties.  There are certain actions that must be coordinated within the block and some of the blocks become quite complex because there are up to 8 crossmembers that must be able to slide vertically and must maintain the same centerline after any one of the mounting heads is rotated while the overall length of a support needs to be stretched.

 

Currently, some of the blocks are using visibility states to combine multiple height ranges and mounting head styles.  I can see that by separating the blocks and eliminating the visibility states would reduce some of the complexity.  This would create a lot more individual blocks, but I would be willing to do that if it would sove the overall problem.

Scott G. Sawdy
scott.sawdy@bluecoyotecad.com
0 Likes