Author Topic: Script to edit dynamic blocks  (Read 291 times)

0 Members and 1 Guest are viewing this topic.

like_citrus

  • Newt
  • Posts: 83
Script to edit dynamic blocks
« on: October 03, 2021, 10:23:40 PM »
I have hundreds of files, each one for a structural steel section, and each section/file has several visibility states such as Plan, Section and Elevation.
I wanted to do edit each file with the following:
- Rename current visibility states.
- Add new visibility states (and place in the correct order as well).
- Copy and paste objects from one visibility state to another. Just copy and paste.
- If possible, show/hide Object Visibility of Parameters and Actions.

Is this possible with a script?
How can I get started?
« Last Edit: October 03, 2021, 11:02:31 PM by like_citrus »

like_citrus

  • Newt
  • Posts: 83
Re: Script to edit dynamic blocks
« Reply #1 on: October 04, 2021, 11:18:32 PM »
Would it be the case that this is not possible?

mhupp

  • Newt
  • Posts: 40
Re: Script to edit dynamic blocks
« Reply #2 on: October 05, 2021, 01:21:11 PM »
Its kinda hard to code anything with out a drawing and examples.

visibility states = layer states?
Do they have standard names?
- Rename current visibility states.

Thes I don't know what your talking about viewports?
- Add new visibility states (and place in the correct order as well).
- Copy and paste objects from one visibility state to another. Just copy and paste.
- If possible, show/hide Object Visibility of Parameters and Actions.

BIGAL

  • Swamp Rat
  • Posts: 849
  • 30 + years of using Autocad
Re: Script to edit dynamic blocks
« Reply #3 on: October 05, 2021, 11:14:43 PM »
I have not tested but what happens when you insert a external dynamic block dwg with all the changes into current dwg does it ask to redefine the block ? May need attsync also.
A man who never made a mistake never made anything

like_citrus

  • Newt
  • Posts: 83
Re: Script to edit dynamic blocks
« Reply #4 on: October 05, 2021, 11:26:19 PM »
The question more so relates to whether scripts work within the Block Editor.
It doesn't look like it's possible.