Rename Example |
Using Programming Languages other than VBA
Sub Example_Rename() ' This example creates a dictionary and adds ' a custom object to that dictionary. It then ' renames the object in the dictionary. Dim dictObj As AcadDictionary Set dictObj = ThisDrawing.Dictionaries.Add("TEST_DICTIONARY") ' Load the ObjectARX application that defines the custom object. ' Note: The application listed here does not exist and ' will cause an error when run. Change the application name ' to the path and name of your ObjectARX application. ThisDrawing.Application.LoadArx ("MyARXApp.dll") ' Create the custom object in the dictionary Dim keyName As String Dim className As String Dim customObj As AcadObject keyName = "OBJ1" className = "CAsdkDictObject" Set customObj = dictObj.AddObject(keyName, className) ' Rename the object dictObj.Rename keyName, "NewKeyName" End Sub
Public Sub Example_RenameLayerSettings() ' This example renames a set of saved layer settings from ' "ColorLinetype" to "OldColorLinetype." Dim oLSM As AcadLayerStateManager ' Access the LayerStateManager object. Set oLSM = ThisDrawing.Application. _ GetInterfaceObject("AutoCAD.AcadLayerStateManager.16") ' Associate the current drawing database with the ' LayerStateManager object. oLSM.SetDatabase ThisDrawing.Database ' Rename the saved layer settings. oLSM.Rename "ColorLinetype", "OldColorLinetype" End Sub
Comments? |
500 Internal Server Error Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator at webmaster@entercad.forsenergy.ru to inform them of the time this error occurred, and the actions you performed just before this error.
More information about this error may be available in the server error log.
Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.