Community
Dynamic Blocks Forum
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Feed results of Calculations inside a dynamic block into a parametric manipulation of the same block.

4 REPLIES 4
SOLVED
Reply
Message 1 of 5
Karsten_FeldmannS5AEN
239 Views, 4 Replies

Feed results of Calculations inside a dynamic block into a parametric manipulation of the same block.

Hello dear community,

I am using Autocad T161.0.0 2023.1.2 without any special extensions.
Right now I am building a dynamic block that has the following properties:
1) It can be stretched with GRIPS in a defined range (incremental).
2.) It can be assigned defined parameters with a block table (power - power per meter).
3.) It calculates some results from the different parameters, like length and assigned power, stores them in attributes, which are displayed formatted. So far it all works fine.

We are dealing with a plastic part that is subject to specific length expansion with temperature changes. So I have inserted 2 variable attributes for min and max temperature and in another attribute I calculate the resulting length expansions and shrinkage with a formula.
Also all good !

As last I would like to use the results of this calculation now around at the block end graphically the values to use. So use them as values for a parametric displacement of two markers, which give me the shortest and the longest value the part can take.

However, I can't find a way to feed these values from the attribute into the parametric.
The parameter manager reports back to me a "parameter error".
"A dependent expression cannot be evaluated". So an incompatibility of data types (as I suspect).

In what way can I achieve the desired result WITHOUT Lisp or VBA ?
If it would be achievable ONLY with LISP or VBA, then I would have to be able to ensure that the block also runs in AUTOCAD LT that is used by my colleagues.

Workaround at the moment:
Until now, I read the determined data from the block after regenerating, and type it manually in the "Properties" in the appropriate fields. (User defined parameters: SHRINK: xx / Elongation: xx).
What works, of course. The "markers" move to the correct positions and everything is OK.
But I want to eliminate this source of error and minimize the inputs.

Which way can I go ?

File attached as block.


Br, K. F

4 REPLIES 4
Message 2 of 5

Instead of the Dynamic Parameters and Actions (Abstand1, Stretch) I'd use "Parametric" (constraints) only. 
I see you have some geometric constraints used already. Why not completely use dimensional constraints. These parameters can be used in any Expressions (as you already did for some calculatons).

 

If you need further help (I don't know your experience with Parametric), let us know again the following (to avoid misunderstandings):
- a complete list of all inputs, which the user can/shall set
- which values must be calculated (and with which formula)

- which output do you wish/need? 

 

- do you want to feed the block references's input values via Attributes or via Properties Window? 

 

 

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.

EESignature

Message 3 of 5

Hi Jürgen,

thank you ! This approach was the first way i tried. The Problem here was, that some calculated parameters need to be displayed close to the block in a correctly formatted way. And the parametric options didn't fit my demands.

But yesterday i found a practical solution i will use and publish here for others.
A colleague from India told me to reverse the order of INPUT and READOUT of user defined parameters.

I used Attributes to call the User entered Inputs. But the parametric commands and manager are not able read from the attributes.

But in the other direction from Parametric to Attribute it's possible. 

So i will reverse these two directions. Use parametrics to calculate and manipulate and attributes to format, display and gather the generated outputs later in a table.

In this way it is possible to use all complex Maths, formatting and geometric feedback Loops back into the block.

I will improve, redo the block and post it here.

   

Message 4 of 5


@Karsten_FeldmannS5AEN wrote:

 

 parametric commands and manager are not able read from the attributes.

But in the other direction from Parametric to Attribute it's possible.    


 

Yep!  🙂

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.

EESignature

Message 5 of 5

Now it's done.
Everything is working fine.

Before this change the Block was using about 70% of "Linear Parameter triggered actions" + Attribute Calculations.

And only about 30% of parametric constraints to manage some mirroring and handling of geometry.

Now it's turned to the opposite. 70% Parametrics to handle geometry changes. No triggered actions.
(Wonder how to manage "Linear parameter triggered Arrays, which i often use ?) 

And Attribute calculations are nearly none. Attributes are only used to display, format and gather information for later  use in reporting or partlists.

I will keep on trying to combine both methods more because each of the methods has its advantages.

What i would need is a "Linear Constraint" that isn't really constrained. 
Or in other words: A "Distance Sensing Parameter" ... a "A linear constraint without a LOCK" ... or a "A linear constraint with a questionmark instead of a LOCK". Or a possibility to measure distances in the geometry that can be handled with the Parameter Manager.

Anyway .... this one is good enaugh and ready to be released in business.

Thanks to Jürgen for his initial input and Support 😉 

K.F. 
  

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

Post to forums  

Forma Design Contest


AutoCAD Beta