Message 1 of 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello
I want to be able to say, change the level of detail to "Export"
If the level of detail "Export" does not exist, then show this message box, else continue.
'Set the level Of detail To Export LOD_NAME = "Export" 'On Error Resume Next ThisApplication.ActiveDocument.ComponentDefinition.RepresentationsManager.LevelofDetailRepresentations(LOD_NAME).Activate If ThisApplication.ActiveDocument.ComponentDefinition.RepresentationsManager.LevelofDetailRepresentations(LOD_NAME) = False MessageBox.Show("Level of Detail does not exist", "Error Handling") End If 'Set the level Of detail back To Default 'ThisApplication.ActiveDocument.ComponentDefinition.RepresentationsManager.LevelofDetailRepresentations("Master").Activate
I have come up with the above but it is not working at the moment.
I am using another piece of code as precedent, which i have pasted below.
'Dim strFileName = ThisDoc.FileName(False) 'Save the current document 'ThisDoc.Save 'Take the current document's name and create the corresponding idw filename, assuming the same strIDWFilename = ThisDoc.ChangeExtension(".idw") MessageBox.Show(strIDWFilename, "Title") On Error Resume Next 'Close the current document 'ThisApplication.CommandManager.ControlDefinitions.Item("AppFileCloseCmd").Execute 'open the indexed file, false opens the file without generating the graphics ThisApplication.Documents.Open(strIDWFilename, True) If System.IO.File.Exists(strIDWFilename) = False MessageBox.Show("Error executing rule. Please ensure that the drawing exists, and has been downloaded from Vault. The drawing must have the same name as this file.", "Error Handling") End If
Appreciate any help
Regards
Solved! Go to Solution.