Very strange code. Could you please attach data_file_patch file?
ABCDEF123
0
3012400
3024000
I hope this code will works:Code - Auto/Visual Lisp: [Select]
) ;_ end of while ) ;_ end of and ) ;_ end of progn ) ;_ end of if ) ;_ end of defun
Try using this .. then compare the lines in the list.Code - Auto/Visual Lisp: [Select]
Code at #3 returns T. Is it correct?
Please don't ask me to do any Lisp code (I havnen't in years and wouldn't be of any use) but if I may make a suggestion:
Read the contents of the file into a list and check the items in the list. The reason being it would be faster if you read contents and operate on a list instead of trying to check as you are reading the file.
I do have these snips of code you can use (left over from my lisping days):
I hope my analysis of your code wasn't too far off base (very rusty at reading lisp code) and these procedures help a little.
Code at #3 returns T. Is it correct?
ABCDEF123
0
3012400
3024000
ABCDEF123
0 ==>change to 3018059
3012400
3024000
Code at #3 returns T. Is it correct?
Dear kpblc,
eg: data.txtCode: [Select]ABCDEF123
0
3012400
3024000
If I want only change the value of Second row , Other values unchangedCode: [Select]ABCDEF123
0 ==>change to 3018059
3012400
3024000
Have a quick way ? Thanks.
HINT: Look in CADR (http://help.autodesk.com/view/ACD/2016/ENU/?guid=GUID-F8E9E4F0-218D-4587-9D7E-922BE57C9F9B) & SUBST (http://help.autodesk.com/view/ACD/2016/ENU/?guid=GUID-25214E69-090A-45C3-8210-6D9801255E44)
Code at #3 returns T. Is it correct?
Dear kpblc,
eg: data.txtCode: [Select]ABCDEF123
0
3012400
3024000
If I want only change the value of Second row , Other values unchanged
Have a quick way ? Thanks.
You would need to read & re-write the file, e.g.:
Yes it is. :-)HINT: Look in CADR (http://help.autodesk.com/view/ACD/2016/ENU/?guid=GUID-F8E9E4F0-218D-4587-9D7E-922BE57C9F9B) & SUBST (http://help.autodesk.com/view/ACD/2016/ENU/?guid=GUID-25214E69-090A-45C3-8210-6D9801255E44)
Thanks ,ronjonp , SUBST is useful !
HINT: Look in CADR (http://help.autodesk.com/view/ACD/2016/ENU/?guid=GUID-F8E9E4F0-218D-4587-9D7E-922BE57C9F9B) & SUBST (http://help.autodesk.com/view/ACD/2016/ENU/?guid=GUID-25214E69-090A-45C3-8210-6D9801255E44)
Thanks ,ronjonp , SUBST is useful !
Good to note Lee 8)HINT: Look in CADR (http://help.autodesk.com/view/ACD/2016/ENU/?guid=GUID-F8E9E4F0-218D-4587-9D7E-922BE57C9F9B) & SUBST (http://help.autodesk.com/view/ACD/2016/ENU/?guid=GUID-25214E69-090A-45C3-8210-6D9801255E44)
Thanks ,ronjonp , SUBST is useful !
Just be aware that subst will substitute ALL occurrences of the item, not just the second line.
HINT: Look in CADR (http://help.autodesk.com/view/ACD/2016/ENU/?guid=GUID-F8E9E4F0-218D-4587-9D7E-922BE57C9F9B) & SUBST (http://help.autodesk.com/view/ACD/2016/ENU/?guid=GUID-25214E69-090A-45C3-8210-6D9801255E44)
Thanks ,ronjonp , SUBST is useful !
Just be aware that subst will substitute ALL occurrences of the item, not just the second line.
Good to note Lee 8)