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

dynamic tree block question: can this be done?

6 REPLIES 6
SOLVED
Reply
Message 1 of 7
Wojty1
626 Views, 6 Replies

dynamic tree block question: can this be done?

Hello everybody.

 

I know that this has already been asked, but I don't remember the keywords to search for the topic, so I made this new one.

 

I have a couple of questions regarding dynamic block creation.

 

  1. Is it possible to create a dynamic block with parameters that can be set with a script file?
    e.g. a simple rectangle with linear parameters "w" (width = 3 cm) and "h" (height = 5 cm) at 0,0
    and a script like this "-INSERT rect 0,0 3 5" which would insert the specified rectangle.
  2. Is it possible to have the value of a parameter displayed as text?
    e.g. a rectangle (3x5 cm) and the text "w= 3cm, h= 5cm" to the right of the rectangle.
  3. Is it possible to have a void parameter that will only be used to show a text?
    e.g. a prism viewed from top with sides of 5 cm each inserted as a 2D object (square 5x5cm) where the parameters are "a= 5cm" and "h= 10cm" (height, which will not be drawn, only shown as text).

Attached is an example of what I would like to create.

 

Any help appreciated. Let me know if anything is not clear.


Windows 10 Pro 64-bit / Windows 7 Pro 64-bit SP1
AutoCAD 2023 64-bit EN, Civil 3D 2022 / 2023 64-bit DE / EN
ASUS Maximus Hero VIII / Intel QuadCore Core i7-7700K @ 4.20GHz / EIZO FlexScan EV2411W 24" + EIZO FlexScan EV2416W 24" / 64 GB Corsair Vengeance LPX (4x 16 GB) Dual-Channel DDR4 @ 3200 MHz / 12 GB ASUS GeForce RTX 3060 OC V2
6 REPLIES 6
Message 2 of 7
SoaresASBCAD
in reply to: Wojty1

Message 3 of 7
Wojty1
in reply to: SoaresASBCAD

@SoaresASBCAD Many thanks for the tutorial video, today I finally watched it 😌.

 

Unfortunately it doesn't cover my question.

So I'm asking again: Is it possible to create a dynamic block with some text that changes depending on the geometry (as shown in the screenshot)?


Windows 10 Pro 64-bit / Windows 7 Pro 64-bit SP1
AutoCAD 2023 64-bit EN, Civil 3D 2022 / 2023 64-bit DE / EN
ASUS Maximus Hero VIII / Intel QuadCore Core i7-7700K @ 4.20GHz / EIZO FlexScan EV2411W 24" + EIZO FlexScan EV2416W 24" / 64 GB Corsair Vengeance LPX (4x 16 GB) Dual-Channel DDR4 @ 3200 MHz / 12 GB ASUS GeForce RTX 3060 OC V2
Message 4 of 7
j.palmeL29YX
in reply to: Wojty1


@Wojty1 wrote:

 

Is it possible to create a dynamic block with some text that changes depending on the geometry (as shown in the screenshot)?

 

Yes. (Attribute -> Field -> BlockPlaceholder)

 

See attached example. 

(the  text will be updated after a REGEN)

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 7
Wojty1
in reply to: j.palmeL29YX

Wow! Many thanks!

 

It works exactly as I wanted it to.

One more question ... or maybe two:
1. Is there an option to avoid to regen the drawing?

While reproducing this block from scratch I'm stuck at the attribute definition. I'm not sure if I understand the concept of how attributes are created.

2. Do I add a block attribute from within the block editor or in the drawing itself?


Windows 10 Pro 64-bit / Windows 7 Pro 64-bit SP1
AutoCAD 2023 64-bit EN, Civil 3D 2022 / 2023 64-bit DE / EN
ASUS Maximus Hero VIII / Intel QuadCore Core i7-7700K @ 4.20GHz / EIZO FlexScan EV2411W 24" + EIZO FlexScan EV2416W 24" / 64 GB Corsair Vengeance LPX (4x 16 GB) Dual-Channel DDR4 @ 3200 MHz / 12 GB ASUS GeForce RTX 3060 OC V2
Message 6 of 7
j.palmeL29YX
in reply to: Wojty1


@Wojty1 wrote:


1. Is there an option to avoid to regen the drawing?


 

To see the latest value of fields you can either update fields manually using the UPDATEFIELD command or let do it AutoCAD automatically after OPEN, SAVE, PLOT, ETRANSMIT or REGEN depending on the value of the system variable FIELDEVAL. 

 


@Wojty1 wrote:

I'm stuck at the attribute definition.


 

A quick and dirty video: 

 

 

For crone and stem AutoCAD "reads" the current values of the geometry (the parameters), height is a "normal" attribut with a leading text, whose value is asked the user for.

 

HTH

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 7 of 7
Wojty1
in reply to: j.palmeL29YX

Many many thanks for your efforts! 🙏

 

Now I need some fine tuning of the block, so the text moves with the tree size.

That'll be the job of "Constraints" which I have to learn next.


Windows 10 Pro 64-bit / Windows 7 Pro 64-bit SP1
AutoCAD 2023 64-bit EN, Civil 3D 2022 / 2023 64-bit DE / EN
ASUS Maximus Hero VIII / Intel QuadCore Core i7-7700K @ 4.20GHz / EIZO FlexScan EV2411W 24" + EIZO FlexScan EV2416W 24" / 64 GB Corsair Vengeance LPX (4x 16 GB) Dual-Channel DDR4 @ 3200 MHz / 12 GB ASUS GeForce RTX 3060 OC V2

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

Post to forums  

Forma Design Contest


AutoCAD Beta