TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: like_citrus on October 03, 2021, 10:23:40 PM

Title: Script to edit dynamic blocks
Post by: like_citrus 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?
Title: Re: Script to edit dynamic blocks
Post by: like_citrus on October 04, 2021, 11:18:32 PM
Would it be the case that this is not possible?
Title: Re: Script to edit dynamic blocks
Post by: mhupp 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.
Title: Re: Script to edit dynamic blocks
Post by: BIGAL 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.
Title: Re: Script to edit dynamic blocks
Post by: like_citrus 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.