AutoCAD 2010 :: Scripting - How To Change Text Layer From One To Another
Sep 4, 2012
I've just recently learned how to use scripts to my advantage. I work for a company that uses a lot of custom details using AutoCAD and have now decided to switch them up and use different layers, fonts & styles. So far I have been able to come up with some script changing the styles of how we want the fonts to look, but I am trying to select one font style, change the layer & color of that text, then close the file.
How to go about making it only change the color of text frames on the active layer? In the final script I will hide all other layers so if it could be done by a visible attribute more easily that would work just as well.
It does almost what I need it to do. except that it also copies the ".ai" in to the layer name. Is there some way to modify this script to have it exclude or delete the file extension?
When running my script to unlock all layers, so I can select all textFrames and copy them to a new layer, I run into a problem with text that has been locked individually. The script unlocks layers that are lock but it does not unlock items that have been locked individually on those layers. Is there a way to unlock these items?
var layerCount = activeDocument.layers; for ( j = layerCount.length - 1; j >= 0; j-- ) { lockedLayers = activeDocument.layers[j];
I have noticed something strange in autocad 2012. when i create a new layer and then pick a color for that layer it will work fine, then when im working in the drawing and i pick a line and go to the pull down to put that line on the new layer, it will not be the color i chose. then when i look in layers to see whats going on, it will be the wrong color, i can change the color back to what i want, but the line will not respond. I actually have to, In the layers, pick a different color, then pick the color i want again and then it will work.
How can I change the layer of a terminal of a components to that component layer without going through each terminal. That is , a block XX has terminals a and b. The XX is currently on layer A and the terminals a and b on layer B. How can I move the layer of a and b to layer A?
Also, I have a 10 page drawing in which I want to tie some components to a particular layer. How can I do this without going through each drawing and doing the changes?
What I am wanting to do is select objects or object mouse and use a keyboard shorcut to change those objects to a layer that is frozen. The layer is called "AS-BUIILT DELETED"
I attached some old PDF drawings and they are just perfect. The background is transparent and they really look pretty good. Is it possible to change the color of the pdf text?
In the old versions of autoCAD I could select everything in the drawing and use the text style pull-down to select the text style I wanted all of the existing text to be and it would change it when the style was selected. Is there not a way to do this in AutoCAD 2011 without using the quick select feature in the properties dialog box?
I solved the same problem with dimensions by turning the dimension toolbar on but the text toolbar doesn't have the style as an option on it.
Whenever I make a new style in a 2012 AutoCAD file for a Detail Callout, I can create the callout bubble but the text entered for sheet numbers goes to another layer. I've searched the web for a solution to this, but I cannot find one. Everything is set to "By Layer" in the callout, so I'm not sure why the text is going to another layer. The linework aside from the text all appears on my current layer.
Is there a way to change the text styles, lets say from "Standard" to "Romans", all at once within an attributed block, or do you have to update each tag attribute individually?
I used the BEDIT command (editor) on my block to modify the text size then save the block editor changes. Then use ATTSYNC to perform the changes on all existing blocks references to resize the texts, but after i complete the ATTSYNC command, the text in all the blocks disappear.
In attached file a.dwg, I use battman command to change text color inside the block. It did well for the color change part but get the text upside down as well. I am in 2010.
working at new job with 2d but some how properties where i can change text width is replaced with 3D visual. how can i change this back to 2d properties?
I've wrriten a script that will create custom annotative scales and a new text style. (It works fine up to that point) The next steps I'm trying to add to the script is to select a text object, set it to the new style, make it annotative and add all of the annotative scales to that text object. CHPROP allows me to make the text object annotaive but I haven't found a command that will let me change the style or add annotative scales to the text object. Any commands I can use in a script to do this ? (or know if this is even possible)? I have 2000+ drawings I need to run this one, I hope I can find the commands to script this with.
I've cut and "paste special" a table from excel to autocad, and would like to edit several (not all) cell's text color from the default (in this case white) to the bylayer color.
When I set up my table style I specified the text to be bylayer, however apparently a paste from excel ignores the setting.
I'm trying to write a script that renames a layer, and group within the layer, then an object within the layer (but not a part of the group) and have it run in a loop.
Here's what I've got so far, the group rename doesn't work.
#target Illustrator var doc = app.activeDocument; idLayers(doc)//IRename layers idGroups(doc)//Rename groups function idLayers(doc){
[code]....
I haven't put in anthing to rename the single object yet since I cant even get the group rename to work. I suspect that the group re-name section isn't working because I'm either using bad syntax or an invalid command.
I want to change the text that says ''gangsterturk25'' I created this file like a year ago, and saved it on my pc, because I thought I might want to change it one day, and the day is today. I made this with the use of a tutorial so I can recall how I dit it exactly. I am a ''noob'' in photoshop so to say. How could I possibly change this.
I have one PSD that I moved from one Windows 7 machine running CS5 to another. When I open the file on the second machine all of the text layers have the little alert triangle icon. When I try to edit the text I get the message:
"Rendering the text layer will cause its layout to change. Existing pixel data will be used."
The font being used is Verdana - which I believe is native on both machines. There are no faux files applied to the fonts.Both machines are running CS5.
why text layers from one computer conflict with another computer.
I have created my own graphics from scratch with GIMP, but the resolution to this issue is eluding me.
I imported a GIF map and want to add red labels. I have no problem adding the labels, but I cannot seem to get the text colored red. Before I create the text layer, the text tool shows the color is red, but it still creates it black. All of the suggestions I've seen (yes, I've read the fine manual) reference the same things, including dragging the color from the foreground color (which I've also changed to red). Nothing I've tried seems to work. I've even saved the image as an XCF, but I have the same problem.
i want to make a TEXT ONLY LAYER.if i want change a font or size, just click a layer and change a font or size. like-photoshop.but, not same-photoshop. i think layer is make a ONLY ONE.
The problem I'm having is that when I try to edit a text layer, the layout of the layer changes completely - I have a grey warning triangle in the affected layer thumbnail that states the following message when I hover over it :
'Font is present on system but requires a layout change'
When I double click to edit the text layer, the following warning dialog pops up:
'Editing or Rendering the text layer will cause the layout to change'
I'm forced to click 'okay' to proceed which is when the layout of the text layer changes completely! Obviously this has massive implications for branding and page consitency!!
Now even if I have to do this the long way round, which means rebuilding each individual text layer for every single document, there is another problem, it appears that after I click 'OK' photoshop distorts the text! This means that I can't increase or decrease the font size to match it up! Same font, Same height, same AA, same weight, different circle radius!
I'm using CS5 64bit Cloud edition on Windows 7, I've already tried updating and reinstalling Photoshop but it doesnt remedy the problem, I've reinstalled a sample batch of the fonts affected and deleted any plugins