Delete object in a layer and change font properties.

Delete object in a layer and change font properties.

ulasdeniz
Mentor Mentor
1,085 Views
8 Replies
Message 1 of 9

Delete object in a layer and change font properties.

ulasdeniz
Mentor
Mentor

Hello Everyone. Believe me I spent 3-4 hours to find a solution but I couldnt find as I tried many script or lisp. I am a newbye in Autocad scripting or lisp. I have 1500 files that needs to e modified. What I need:

 

1- Delete the objects in a specified layer called "DEMTEXT". The layers can stay but I need the objects to be erased

 

2- The couples of the text fonts shoulb be changed and all the text color should be changed to white (black on paper). 

 

What I need I need two script that I can use with Autoscript. thats all. I tried many script to delete objects in a layer. but they just deleted the layers and assing a 0 layer to the objects that I was trying to get rid of.  I need working scripts. thats all. please help me, as ı always do to other people in forums. thanks. 

 

 


Ulaş Deniz


Forumlarımızda çözülen sorularınızı "ÇÖZÜM OLARAK KABUL ET" ( "ACCEPT AS SOLUTION" ) seçimiyle işaretlemeyi lütfen unutmayın.
Beğendiğiniz mesajları lütfen "Övgü Puanı" (KUDO) ile ödüllendirin.
Youtube : https://www.youtube.com/channel/UCkJpVueGScmJvW1RIgqttSg

0 Likes
1,086 Views
8 Replies
Replies (8)
Message 2 of 9

john.uhden
Mentor
Mentor

So, you want a routine that looks through 1500 DWGS and performs two actions on each?

I wrote one once that found and ran 23 modificatrions to 13,000 drawings in varying branches of a directory tree, all on one computer running one session of AutoCAD, with zero errors.  It might upset some of you, but I got paid handsomely for it.  Luckily, now I have little time for that stuff because I'm back to work!  Maybe I could find the time to post the recursive function to find all the files.  You could do the rest, right?

John F. Uhden

0 Likes
Message 3 of 9

pbejse
Mentor
Mentor

@ulasdeniz wrote:

 

 

2- The couples of the text fonts shoulb be changed and all the text color should be changed to white (black on paper). 

Thanks.  


The rest is clear except #2, What are the conditions, you say couple which means not all,

  • text fonts means to a specific font type.
  • text color to white regardless of what layer they are, or bylayer?
0 Likes
Message 4 of 9

ulasdeniz
Mentor
Mentor
thank you @pbejse . there are defined text styles. they can be changed via style. it can be done for all text to change the fonts (smothing like Arial etc) and colors. the best is control by style, if not, all can have same color, same font type but differnt sizes (as keeping the original sizes or proportions.)

Ulaş Deniz


Forumlarımızda çözülen sorularınızı "ÇÖZÜM OLARAK KABUL ET" ( "ACCEPT AS SOLUTION" ) seçimiyle işaretlemeyi lütfen unutmayın.
Beğendiğiniz mesajları lütfen "Övgü Puanı" (KUDO) ile ödüllendirin.
Youtube : https://www.youtube.com/channel/UCkJpVueGScmJvW1RIgqttSg

0 Likes
Message 5 of 9

ulasdeniz
Mentor
Mentor
Also I have the Autoscript to run the script multiple files at once.

Ulaş Deniz


Forumlarımızda çözülen sorularınızı "ÇÖZÜM OLARAK KABUL ET" ( "ACCEPT AS SOLUTION" ) seçimiyle işaretlemeyi lütfen unutmayın.
Beğendiğiniz mesajları lütfen "Övgü Puanı" (KUDO) ile ödüllendirin.
Youtube : https://www.youtube.com/channel/UCkJpVueGScmJvW1RIgqttSg

0 Likes
Message 6 of 9

pbejse
Mentor
Mentor

If you din't mind, what is the specific test style so i can incorporate the change in to text style on the program. 


@ulasdeniz wrote:
...all can have same color...

I guess your saying go ahead and assing WHITE regardless of layer then

 

0 Likes
Message 7 of 9

ulasdeniz
Mentor
Mentor

Yes making it simple is the best. I just want to keep the font sizes same as the original. the color and the text font can be similar. so they are controlled by layer currently

May be this make everything simple. after we delete the DEMTEX LAYER, the files has only one active layer named object. so dimension texts are also in same layer.  so there are two active layers. one will be deleted with object in it other will be remaining. 


Ulaş Deniz


Forumlarımızda çözülen sorularınızı "ÇÖZÜM OLARAK KABUL ET" ( "ACCEPT AS SOLUTION" ) seçimiyle işaretlemeyi lütfen unutmayın.
Beğendiğiniz mesajları lütfen "Övgü Puanı" (KUDO) ile ödüllendirin.
Youtube : https://www.youtube.com/channel/UCkJpVueGScmJvW1RIgqttSg

0 Likes
Message 8 of 9

pbejse
Mentor
Mentor

@ulasdeniz wrote:

Yes making it simple is the best. I just want to keep the font sizes same as the original. the color and the text font can be similar. so they are controlled by layer currently

May be this make everything simple. after we delete the DEMTEX LAYER, the files has only one active layer named object. so dimension texts are also in same layer.  so there are two active layers. one will be deleted with object in it other will be remaining. 


Sorry, I still don't understand the part of Text style and color, I did asked you to specify a Text Style name. Now there is the layers. 

 

Tell you what can you post a drawing sample of "before" and  "after" Can you do that?

 

0 Likes
Message 9 of 9

pbejse
Mentor
Mentor

 

Font Style: Change Text Style assigned to an existing Multi leader / Dimension ?

 

 

 

0 Likes