C3D-0621 · Read PDF3/4/5 scale text (read-only) done
Read-only: MText in the PDF3/PDF4/PDF5 imports that carries scale info (graphic scale ticks, SCALE / IN FEET / 1 inch =, sheet numbers, LF and STA labels) with positions and heights, to work out each import's scale factor.
C# payload
var ms=(BlockTableRecord)Tx.GetObject(SymbolUtilityServices.GetBlockModelSpaceId(Db),OpenMode.ForRead);
foreach(ObjectId id in ms){ var m=Tx.GetObject(id,OpenMode.ForRead) as MText; if(m==null) continue;
if(!(m.Layer.StartsWith("PDF3")||m.Layer.StartsWith("PDF4")||m.Layer.StartsWith("PDF5"))) continue;
var t=m.Text.Replace("\n"," ").Replace("\r","").Trim();
var u=t.ToUpper();
bool num=System.Text.RegularExpressions.Regex.IsMatch(t,@"^\d{1,4}$");
if(num||u.Contains("SCALE")||u.Contains("FEET")||u.Contains("INCH")||u.Contains("1\"")||System.Text.RegularExpressions.Regex.IsMatch(u,@"^C\d\.\d")||u.Contains("SHEET")||u.Contains("PLAN")||u.Contains("PROFILE")||u.Contains("LF")||u.Contains("STA "))
Log(m.Layer.Substring(0,4)+"|"+m.Handle+"|"+m.Location.X.ToString("F2")+","+m.Location.Y.ToString("F2")+"|h="+m.TextHeight.ToString("F3")+"|rot="+(m.Rotation*180/Math.PI).ToString("F1")+"|"+t);
}
Result
Log
PDF3|3830F|2296301.58,1296217.58|h=0.100|rot=88.0|750 PDF3|38310|2296305.42,1296217.63|h=0.100|rot=276.2|740 PDF3|38311|2296307.16,1296217.41|h=0.100|rot=70.5|730 PDF3|38312|2296309.53,1296216.51|h=0.100|rot=50.4|720 PDF3|38313|2296302.18,1296219.37|h=0.100|rot=61.5|750 PDF3|38314|2296318.39,1296221.77|h=0.100|rot=335.4|720 PDF3|38315|2296300.49,1296213.28|h=0.100|rot=58.9|740 PDF3|38316|2296303.41,1296225.41|h=0.100|rot=345.5|740 PDF3|38317|2296310.65,1296216.69|h=0.100|rot=48.5|720 PDF3|38318|2296320.56,1296224.21|h=0.100|rot=337.0|720 PDF3|38319|2296313.29,1296214.51|h=0.100|rot=72.9|700 PDF3|3831A|2296310.55,1296208.55|h=0.100|rot=330.4|700 PDF3|3831B|2296313.73,1296213.19|h=0.100|rot=84.5|690 PDF3|3831C|2296320.04,1296217.04|h=0.100|rot=313.9|690 PDF3|3831D|2296317.71,1296225.18|h=0.100|rot=355.3|730 PDF3|3831E|2296320.51,1296221.64|h=0.100|rot=23.7|710 PDF3|3831F|2296309.06,1296210.06|h=0.100|rot=26.8|710 PDF3|38320|2296315.13,1296217.41|h=0.100|rot=52.9|710 PDF3|38321|2296306.41,1296225.57|h=0.100|rot=358.5|730 PDF3|38322|2296311.82,1296222.74|h=0.100|rot=6.7|730 PDF3|38323|2296312.61,1296225.52|h=0.100|rot=1.2|720 PDF3|38324|2296319.09,1296210.16|h=0.100|rot=357.5|680 PDF3|38325|2296306.08,1296208.02|h=0.100|rot=12.3|720 PDF3|38326|2296314.65,1296221.33|h=0.100|rot=37.6|720 PDF3|38327|2296311.41,1296221.59|h=0.060|rot=0.0|8 PDF3|3832C|2296306.41,1296215.88|h=0.060|rot=49.0|1,300 LF (8 x 160 L.F.) PDF3|3832D|2296306.48,1296215.80|h=0.060|rot=48.9|60-inch Ø CMP @ 0.5% PDF3|38331|2296302.27,1296217.54|h=0.100|rot=88.3|750 PDF3|38332|2296305.49,1296220.48|h=0.100|rot=80.5|740 PDF3|38333|2296307.69,1296220.49|h=0.100|rot=80.5|730 PDF3|38334|2296309.08,1296218.25|h=0.100|rot=333.0|720 PDF3|3833C|2296307.88,1296220.47|h=0.060|rot=0.5|14 PDF3|3833D|2296308.46,1296218.81|h=0.060|rot=1.0|8 PDF3|3833E|2296308.34,1296217.99|h=0.060|rot=0.0|8 PDF3|38340|2296310.76,1296220.20|h=0.060|rot=1.0|2 PDF3|38348|2296302.95,1296218.53|h=0.101|rot=89.0|748 PDF3|38349|2296304.31,1296218.62|h=0.101|rot=89.0|740 PDF3|3834A|2296306.14,1296219.49|h=0.101|rot=89.0|730 PDF3|3834B|2296308.29,1296222.49|h=0.101|rot=359.8|732 PDF3|3834C|2296312.10,1296222.10|h=0.101|rot=24.3|728 PDF3|3834D|2296307.49,1296222.05|h=0.101|rot=12.8|730 PDF3|3834E|2296309.72,1296218.20|h=0.101|rot=48.8|724 PDF3|3834F|2296309.72,1296217.54|h=0.101|rot=48.9|720 PDF3|38350|2296307.96,1296216.49|h=0.101|rot=48.9|726 PDF3|38353|2296304.31,1296217.32|h=0.060|rot=1.0|7 PDF3|38354|2296305.75,1296217.32|h=0.060|rot=1.0|7 PDF3|38364|2296317.04,1296205.35|h=0.104|rot=0.0|The scale as stated, is valid only on original drawing. PDF3|38368|2296321.46,1296209.02|h=0.075|rot=0.0|ENGINEERS | PLANNERS | SITE CONSULTANTS PDF3|3836D|2296322.24,1296206.51|h=0.201|rot=0.0|PLAN PDF3|3836E|2296322.62,1296205.82|h=0.352|rot=0.0|C5.0 PDF3|38373|2296291.47,1296225.85|h=0.120|rot=0.0|THAN THREE INCHES IN SIZE. PDF3|38376|2296291.47,1296225.24|h=0.120|rot=0.0|THAN 8 INCHES IN LOOSE LIFTS OVER THE FULL WIDTH AND COMPACTED TO 98% PDF3|38391|2296315.10,1296206.01|h=0.100|rot=0.0|1 inch = ft. PDF3|38392|2296315.22,1296206.19|h=0.100|rot=0.0|( IN FEET ) PDF3|38393|2296314.65,1296207.04|h=0.151|rot=0.0|GRAPHIC SCALE PDF3|38394|2296312.96,1296206.76|h=0.080|rot=0.0|50 PDF3|38395|2296313.99,1296206.76|h=0.080|rot=0.0|0 PDF3|38396|2296314.46,1296206.76|h=0.080|rot=0.0|25 PDF3|38397|2296314.96,1296206.76|h=0.080|rot=0.0|50 PDF3|38398|2296315.94,1296206.76|h=0.080|rot=0.0|100 PDF3|38399|2296317.94,1296206.76|h=0.080|rot=0.0|200 PDF3|3839A|2296315.60,1296206.01|h=0.100|rot=0.0|50 PDF3|3839B|2296311.01,1296218.27|h=0.100|rot=0.0|PROP. 131 LF RET. WALL PDF3|383A6|2296307.92,1296223.73|h=0.109|rot=0.0|1 PDF3|383A7|2296304.98,1296221.56|h=0.110|rot=0.0|2 PDF3|383A8|2296304.69,1296219.32|h=0.110|rot=0.0|3 PDF3|383A9|2296304.78,1296216.41|h=0.110|rot=0.0|4 PDF3|383AA|2296308.85,1296221.62|h=0.110|rot=0.0|5 PDF3|383AB|2296312.48,1296219.09|h=0.110|rot=0.0|6 PDF3|383AC|2296312.58,1296217.55|h=0.110|rot=0.0|7 PDF3|383AD|2296304.23,1296215.09|h=0.110|rot=0.0|8 PDF3|383AE|2296307.02,1296215.32|h=0.110|rot=0.0|9 PDF3|383AF|2296309.81,1296216.27|h=0.100|rot=0.0|10 PDF3|383B0|2296311.63,1296216.55|h=0.100|rot=0.0|11 PDF3|383B1|2296307.38,1296214.25|h=0.100|rot=0.0|12 PDF3|383B2|2296306.54,1296221.34|h=0.100|rot=0.0|13 PDF3|383B3|2296306.54,1296219.52|h=0.100|rot=0.0|14 PDF3|383B4|2296306.54,1296217.58|h=0.100|rot=0.0|15 PDF3|383B5|2296310.39,1296220.02|h=0.100|rot=0.0|16 PDF3|383B6|2296309.69,1296218.58|h=0.100|rot=0.0|17 PDF3|383B7|2296308.18,1296218.00|h=0.100|rot=0.0|18 PDF3|383B8|2296312.32,1296221.64|h=0.100|rot=0.0|33 PDF3|383B9|2296315.34,1296226.52|h=0.100|rot=0.0|34 PDF3|383BA|2296310.78,1296218.20|h=0.100|rot=0.0|35 PDF3|383BB|2296290.17,1296227.99|h=0.160|rot=0.0|FIELD REDLINE 10/20/26 · 260613 STORM AS-BUILT · numbered items: see instruction sheet PDF4|3FBBE|2321680.19,1282532.95|h=0.080|rot=0.0|SS P10: 31 LF PDF4|3FBC7|2321676.47,1282533.24|h=0.080|rot=0.0|SEWER PLANS FOR PDF4|3FBDD|2321680.99,1282533.18|h=0.080|rot=0.0|SS P12: 86 LF PDF4|3FBDF|2321683.10,1282533.12|h=0.080|rot=0.0|SS P14: 134 LF PDF4|3FBE1|2321685.74,1282533.96|h=0.080|rot=0.0|SS P16: 130 LF PDF4|3FBE5|2321678.66,1282532.61|h=0.080|rot=0.0|SS P9: 89 LF PDF4|3FC1F|2321673.82,1282520.97|h=0.080|rot=0.0|STM-A3: 42 LF PDF4|3FC20|2321671.81,1282520.87|h=0.080|rot=0.0|STM-A2: 137 LF PDF4|3FC23|2321669.85,1282521.08|h=0.080|rot=0.0|STM-A1: 58 LF PDF4|3FC6C|2321681.57,1282521.97|h=0.080|rot=0.0|STM-B3: 90 LF PDF4|3FC6E|2321679.53,1282523.05|h=0.080|rot=0.0|STM-B2: 85 LF PDF4|3FC70|2321678.54,1282521.98|h=0.080|rot=0.0|STM-B1: 72 LF PDF4|3FCB0|2321685.75,1282521.78|h=0.080|rot=0.0|STM C3: 13 LF PDF4|3FCB2|2321687.83,1282522.27|h=0.080|rot=0.0|STM C2: 39 LF PDF4|3FCB4|2321688.49,1282522.60|h=0.080|rot=357.1|STM C1: 91 LF PDF4|3FCF3|2321683.58,1282527.40|h=0.101|rot=0.0|50 PDF4|3FD11|2321665.44,1282532.71|h=0.100|rot=276.2|740 PDF4|3FD12|2321667.18,1282532.49|h=0.100|rot=70.7|730 PDF4|3FD13|2321669.55,1282531.59|h=0.100|rot=50.4|720 PDF4|3FD14|2321662.21,1282534.46|h=0.100|rot=61.8|750 PDF4|3FD15|2321670.67,1282531.78|h=0.100|rot=48.7|720 PDF4|3FD16|2321673.31,1282529.60|h=0.100|rot=72.6|700 PDF4|3FD17|2321671.84,1282537.83|h=0.100|rot=6.7|730 PDF4|3FD18|2321671.44,1282536.67|h=0.060|rot=0.0|8 PDF4|3FD1D|2321666.44,1282530.97|h=0.060|rot=48.9|1,300 LF (8 x 160 L.F.) PDF4|3FD1E|2321666.50,1282530.89|h=0.060|rot=48.9|60-inch Ø CMP @ 0.5% PDF4|3FD22|2321662.29,1282532.63|h=0.100|rot=88.0|750 PDF4|3FD23|2321665.52,1282535.57|h=0.100|rot=80.5|740 PDF4|3FD24|2321667.72,1282535.58|h=0.100|rot=80.5|730 PDF4|3FD25|2321669.10,1282533.33|h=0.100|rot=332.9|720 PDF4|3FD2D|2321667.90,1282535.55|h=0.060|rot=0.5|14 PDF4|3FD2E|2321668.49,1282533.89|h=0.060|rot=1.0|8 PDF4|3FD2F|2321668.36,1282533.07|h=0.060|rot=1.0|8 PDF4|3FD31|2321670.78,1282535.29|h=0.060|rot=1.0|2 PDF4|3FD45|2321662.98,1282533.61|h=0.101|rot=89.0|748 PDF4|3FD46|2321664.34,1282533.71|h=0.101|rot=89.0|740 PDF4|3FD47|2321666.16,1282534.58|h=0.101|rot=89.0|730 PDF4|3FD48|2321668.31,1282537.57|h=0.101|rot=359.8|732 PDF4|3FD49|2321672.13,1282537.19|h=0.101|rot=24.3|728 PDF4|3FD4A|2321667.51,1282537.13|h=0.101|rot=12.8|730 PDF4|3FD4B|2321669.74,1282533.28|h=0.101|rot=48.9|724 PDF4|3FD4C|2321669.75,1282532.63|h=0.101|rot=48.9|720 PDF4|3FD4D|2321667.98,1282531.58|h=0.101|rot=48.9|726 PDF4|3FD53|2321664.33,1282532.40|h=0.060|rot=1.0|7 PDF4|3FD54|2321665.78,1282532.40|h=0.060|rot=1.0|7 PDF4|3FD7C|2321668.53,1282528.67|h=0.100|rot=0.0|1 inch = ft. PDF4|3FD7D|2321668.65,1282528.85|h=0.100|rot=0.0|( IN FEET ) PDF4|3FD7E|2321668.07,1282529.70|h=0.151|rot=0.0|GRAPHIC SCALE PDF4|3FD7F|2321666.39,1282529.42|h=0.080|rot=0.0|50 PDF4|3FD80|2321667.42,1282529.42|h=0.080|rot=0.0|0 PDF4|3FD81|2321667.89,1282529.42|h=0.080|rot=0.0|25 PDF4|3FD82|2321668.39,1282529.42|h=0.080|rot=0.0|50 PDF4|3FD83|2321669.36,1282529.42|h=0.080|rot=0.0|100 PDF4|3FD84|2321671.36,1282529.42|h=0.080|rot=0.0|200 PDF4|3FD85|2321669.03,1282528.67|h=0.100|rot=0.0|50 PDF4|3FD8E|2321687.51,1282516.13|h=0.104|rot=0.0|The scale as stated, is valid only on original drawing. PDF4|3FD92|2321691.93,1282519.81|h=0.075|rot=0.0|ENGINEERS | PLANNERS | SITE CONSULTANTS PDF4|3FD96|2321691.85,1282517.46|h=0.201|rot=0.0|UTILITY PROFILES PDF4|3FD97|2321693.09,1282516.60|h=0.352|rot=0.0|C6.0 PDF4|3FD98|2321679.95,1282526.64|h=0.181|rot=0.0|SANITARY SEWER PROFILE "LINE A" PDF4|3FD99|2321679.95,1282526.40|h=0.101|rot=0.0|HORIZ. SCALE: 1" = 50' PDF4|3FD9A|2321679.95,1282526.23|h=0.101|rot=0.0|VERT. SCALE: 1" = 10' PDF4|3FD9B|2321668.87,1282517.12|h=0.181|rot=0.0|STORM PROFILE "LINE A" PDF4|3FD9C|2321668.87,1282516.88|h=0.101|rot=0.0|HORIZ. SCALE: 1" = 50' PDF4|3FD9D|2321668.87,1282516.71|h=0.101|rot=0.0|VERT. SCALE: 1" = 10' PDF4|3FD9E|2321678.86,1282517.12|h=0.181|rot=0.0|STORM PROFILE "LINE B" PDF4|3FD9F|2321678.86,1282516.88|h=0.101|rot=0.0|HORIZ. SCALE: 1" = 50' PDF4|3FDA0|2321678.86,1282516.71|h=0.101|rot=0.0|VERT. SCALE: 1" = 10' PDF4|3FDAD|2321686.28,1282517.12|h=0.181|rot=0.0|STORM PROFILE "LINE C" PDF4|3FDAE|2321686.28,1282516.88|h=0.101|rot=0.0|HORIZ. SCALE: 1" = 50' PDF4|3FDAF|2321686.28,1282516.71|h=0.101|rot=0.0|VERT. SCALE: 1" = 10' PDF5|48A3B|2296787.23,1266841.36|h=0.250|rot=21.7|730 PDF5|48A3C|2296789.40,1266835.41|h=0.250|rot=1.4|720 PDF5|48A3D|2296791.59,1266833.60|h=0.250|rot=359.6|720 PDF5|48A40|2296783.12,1266840.28|h=0.151|rot=359.9|1,300 LF (8 x 160 L.F.) PDF5|48A41|2296783.08,1266840.02|h=0.151|rot=359.9|60-inch Ø CMP @ 0.5% PDF5|48A43|2296791.95,1266839.11|h=0.250|rot=283.8|720 PDF5|48A49|2296792.00,1266841.19|h=0.151|rot=311.5|8 PDF5|48A4A|2296790.25,1266840.08|h=0.151|rot=311.5|8 PDF5|48A4B|2296798.39,1266839.14|h=0.151|rot=311.5|2 PDF5|48A5C|2296806.76,1266821.16|h=0.104|rot=0.0|The scale as stated, is valid only on original drawing. PDF5|48A5F|2296811.18,1266824.83|h=0.075|rot=0.0|ENGINEERS | PLANNERS | SITE CONSULTANTS PDF5|48A63|2296810.83,1266822.49|h=0.201|rot=0.0|SWM PLAN & DETAILS PDF5|48A64|2296812.34,1266821.63|h=0.352|rot=0.0|C7.0 PDF5|48A65|2296785.47,1266830.40|h=0.121|rot=0.0|SCALE: 1" = 20' PDF5|48A66|2296785.46,1266830.68|h=0.251|rot=0.0|STORMWATER MANAGEMENT FACILITY - PLAN VIEW PDF5|48A67|2296795.18,1266841.86|h=0.100|rot=0.0|1 inch = ft. PDF5|48A68|2296794.75,1266842.68|h=0.151|rot=0.0|GRAPHIC SCALE PDF5|48A69|2296794.60,1266842.39|h=0.060|rot=0.0|0 PDF5|48A6A|2296795.58,1266842.40|h=0.060|rot=0.0|20 PDF5|48A6B|2296796.58,1266842.40|h=0.060|rot=0.0|40 PDF5|48A6C|2296795.69,1266841.87|h=0.100|rot=0.0|20 PDF5|48A6D|2296795.08,1266842.40|h=0.060|rot=0.0|10 PDF5|48A71|2296796.82,1266821.70|h=0.121|rot=0.0|SCALE: 1" = 2' PDF5|48A74|2296782.30,1266823.91|h=0.121|rot=0.0|SCALE: N.T.S. PDF5|48A76|2296802.57,1266834.53|h=0.121|rot=0.0|SCALE: N.T.S. PDF5|48A87|2296803.58,1266832.93|h=0.080|rot=0.0|1 PDF5|48A8B|2296803.57,1266832.73|h=0.080|rot=0.0|2 PDF5|48A8F|2296803.57,1266832.53|h=0.080|rot=0.0|5 PDF5|48A93|2296803.54,1266832.32|h=0.080|rot=0.0|10 PDF5|48A97|2296803.54,1266832.12|h=0.080|rot=0.0|25 PDF5|48A9B|2296803.54,1266831.92|h=0.080|rot=0.0|50 PDF5|48A9F|2296803.51,1266831.72|h=0.080|rot=0.0|100
Notes
What worked, what didn't, job-specific gotchas — flagged notes feed the recipes.
No notes yet.