Jozi68 发表于 2022-7-6 11:31:54

VB.net: text filter

Im using the following code to select all text on a specific layer on my drawing:
 
Dim tvs() As TypedValue = New TypedValue() {New TypedValue(CType(DxfCode.Operator, Integer), "New TypedValue(CType(DxfCode.Start, Integer), "TEXT"), _
New TypedValue(CType(DxfCode.LayerName, Integer), "SettingOut"), _
New TypedValue(CType(DxfCode.Operator, Integer), "and>")}
 
 
Is there a way to say only select text that starts with the letter "A"?

gile 发表于 2022-7-6 12:17:18

Hi,
 
You can use generic characters with string type values.
You don't need to use the "AND" operator, it's the default.
 

TypedValue[] tvs = new TypedValue[]{   new TypedValue(0, "TEXT"),   new TypedValue(8, "SettingOut"),   new TypedValue(1, "A*")};

Jozi68 发表于 2022-7-6 12:34:49

Thanks, it works beautifully
页: [1]
查看完整版本: VB.net: text filter