How to use Field.FindField Method

How to use Field.FindField Method

Anonymous
Not applicable
386 Views
1 Reply
Message 1 of 2

How to use Field.FindField Method

Anonymous
Not applicable

Field.FindField Method in AutoCad

public static bool FindField( string text, int iSearchFrom, ref int nStartPos, ref int nEndPos );

i try this code:

using (var tr = Util.StartTransaction())

using (var attRef = tr.GetObject(attId, OpenMode.ForWrite))

{

var fieldId = attRef.GetField();

using (Field field = tr.GetObject(fieldId, OpenMode.ForWrite))

{

Attribute.Field.Value = field.GetStringValue();

Field[] fieldList = field.GetChildren();

foreach (Field fd in fieldList)

{

var nStartPos = 0;

var nEndPos = 0;

var isFindField = Field.FindField(attRef.TextString, 0, ref nStartPos, ref nEndPos);//alway return false }

}

}

 

But isFindField always return false

0 Likes
387 Views
1 Reply
Reply (1)
Message 2 of 2

hak_vz
Advisor
Advisor

Transfer this request to .Net forum

Miljenko Hatlak

EESignature

Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
0 Likes