Message 1 of 2
displaying last part of project name in 2D titleblock

Not applicable
01-20-2015
05:58 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I alreaddy worked (thanks to someone else) to get the full project name automaticaly to display in the titleblock of my drawings but I only need the part of it that is inbetween parentheses. Example:
Projectname full: BEKAERT - TER BEKE - WAREGEM (BBCTBW)
Projectfile: BEKAERT - TER BEKE - WAREGEM (BBCTBW).ipj
Projectname to display in titleblock: BBCTBW
Code I was given to get the projectname and copy it to my iProperties:
Dim IPJ as String Dim IPJ_Name As String Dim IPJ_Path As String Dim FNamePos As Long 'set a reference to the FileLocations object. IPJ = ThisApplication.FileLocations.FileLocationsFile 'get the location of the last backslash seperator FNamePos = InStrRev(IPJ, "\", -1) 'get the project file name with the file extension IPJ_Name = Right(IPJ, Len(IPJ) - FNamePos) 'get the project name (without extension) IPJ_ShortName = Left(IPJ_Name, Len(IPJ_Name) - 4) 'get the path of the folder containing the project file IPJ_Folder_Location = Left(IPJ, Len(IPJ) - Len(IPJ_Name)) 'Converts the project file name to UPPER CASE IPJ_Shortname = UCase(IPJ_Shortname) iProperties.Value("Project", "Project") = IPJ_Shortname iLogicVb.UpdateWhenDone = True
How can I isolate the data inbeween parentheses?
Thanks so mutch in advance!
Beli