Parametric Blocks - is it possible to pass a parameter value in to a block attribute?

aridzv
edited February 2021 in 2D Drafting

Hi.
I have a set of parametric blocks representing pipes.
each one have a parameter for the length.
is it possible to pass the block parameter (representing the pipe length) value to a block attribute?
I've attached an example block:
and in that block, I want the value of parameter d1 to automatically assigned to the value field of the QUANTITY attribute
thanks,
Ari.

Comments

  • I did something that was update a attribute in a block based on another blocks attribute, you have to set the field to the attribute ID textvalue.

    Trying with simpler text from limited testing . %<\AcObjProp Object(%<_ObjId 103460128>%).TextString \f "%lu2%pr3">% can not put a field as value but I am happy to be shown if possible.

  • @ALANH
    thanks for the reply.
    I know how to get a value in to one attribute from another - this is not the case here.
    the problem is how to get a value from a parameter to an attribute.
    Ari.

  • ALANH
    edited February 2021

    Read the question backwards you want d1 value for dynamic block is easy. An alternative may be use a field that is length of line so avoid parametric, that worked for mtext will make something for block att if can find time.

  • The answer is now in the lisp section don't double post its confusing.

  • @ALANH
    thanks for the reply!
    1. the issue is parametric block. bricscad don't have dynamic blocks, this is part of the problem.
    2. I accept your comment about the double post. lets continue in the lisp section of the forum.

  • aridzv
    edited February 2021

    Bricscad support team sent me a short video that show's how to use formula field to assign parameter value to an attribute.
    I believe it can be helpful to others so I uploaded it over here.
    Many Thanks to Bricscad Team!
    Ari.