cambiar el nombre de todas las capas de microstation poniendo un letra k en el inicio del nombre de la capa
def changeName(layerName):
return "k" + layerName
All generations.
def changeName(layerName):
return "k" + layerName
Private Sub Command1_Click()
Dim I As Long
For I = 1 To ThisDrawing.LayerTable.Count
ThisDrawing.LayerTable.Item(I).Name = "k" & ThisDrawing.LayerTable.Item(I).Name
Next I
End Sub
#
function add(a, b):
return a + b
add(1, 2)
string[] layers = doc.Layers.GetNames();
for (int i = 0; i < layers.Length; i++)
{
string layer = layers[i];
if (layer.StartsWith("A"))
{
doc.Layers.Rename(layer, "K" + layer);
}
}
import unittest
class TestAdd(unittest.TestCase):
def test_add(self):
self.assertEqual(add(1, 2), 3)
## Table of Contents
- [Usage](#usage)
- [API](#api)
## Usage
Sub RenameLayers()
Dim layer As Element
For Each layer In ActiveModelReference.Layers
layer.Name = "MOD-" & layer.Name
Next layer
End Sub
Generate
More than just a code generator. A tool that helps you with a wide range of tasks. All in one place.
Function from Description
Text Description to SQL Command
Translate Languages
Generate HTML from Description
Code to Explanation
Fix invalid Code
Get Test for Code
Class from Description
Regex from Description
Regex to Explanation
Git Command from Description
Linux Command
Function from Docstring
Add typing to code
Get Language from Code
Time complexity
CSS from Description
Meta Tags from Description