Message 1 of 2
Remove leading characters for each item in an array
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
We are developing code to allow our users to setup drawings with sheet formats. We currently have code pulling the list of all sheet formats present and providing a multi-list selection window. Further in the process, we are using leading characters in the format name to add specific names to the individual sheets being added.
Is there a way to trim the first few characters from the array automatically, so the identifiers are not visible in the selection window?
Our code for the array list:
Dim MyArrayList As New ArrayList Dim oDoc As DrawingDocument oDoc = ThisApplication.ActiveDocument Dim oSheetformats As SheetFormats oSheetformats = oDoc.SheetFormats Dim oSheetFormat As SheetFormat 'place each sheet format into the list For Each oSheetFormat In oSheetformats MyArrayList.Add(oSheetFormat.Name) Next
Example of a sheet format name we are using:
1: Sheet Format A
1: Sheet Format B
2: Sheet Format C
Sheet format names may share the first character.