
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I don’t know if I’m even going down the right path. I’m try to take a custom iproperty and split it every 30 characters (spaces count as a character). From there I would like it to make a custom iproperty for every 30 characters line. If it’s splits in the middle of a word of number I would like it to go to the space before the last 30 characters word or number.
For Example:
The custom iproperty (TF BOM) =
GRAYLOC HUB, 2INB14, BW, NON-RECESSED, 2.375 OD X 1.939 ID; W/ .125 THK INCONEL 625 WELD OVERLAY ON SEALING SURFACE
I would like the make custom iproperty that split it (spaces count as a character):
Custom iproperty (Line 1) = GRAYLOC HUB, 2INB14, BW, (25 characters counting last space)
Custom iproperty (Line 2) = NON-RECESSED, 2.375 OD X 1.939 (30 characters counting last space)
Custom iproperty (Line 3) = ID; W/ .125 THK INCONEL 625 (28 characters counting last space)
Custom iproperty (Line 4) = WELD OVERLAY ON SEALING (24 characters counting last space)
Custom iproperty (Line 5) = SURFACE (7 characters)
Our attempt at writhing the code below. It kind of works but has problems when it comes to spaces.
SyntaxEditor Code Snippet
DL1 = " " & Split(StrReverse(Left(iProperties.Value("Custom", "TF BOM"),30)))(1) & " " iProperties.Value("Custom", "Line 1") = Split(iProperties.Value("Custom", "TF BOM"), DL1)(0) & DL1 iProperties.Value("Custom", "Line 2") = Split(iProperties.Value("Custom", "TF BOM"), DL1)(1) iProperties.Value("Custom", "Line 3") = Split(iProperties.Value("Custom", "TF BOM"), DL1)(2) iProperties.Value("Custom", "Line 4") = Split(iProperties.Value("Custom", "TF BOM"), DL1)(3) iProperties.Value("Custom", "Line 5") = Split(iProperties.Value("Custom", "TF BOM"), DL1)(4)
I would appreciate any help you might be able to give.
Solved! Go to Solution.