ok here is, i hope, a better explaination.
ive attached some pics and a sample dwg.
i have another lisp that takes the text in my BOM, makes a list called (mainlst) and then writes this list to a text file for another external program to process.
im attempting to edit the mainlst at the same time edit the text fields in my BOM.
once i get the text fields to change to my desire, i think i got the actual editing of the mainlst before its written to a text file nailed down.
what im after:
in my BOM when the inches field has a number in it
and the field under "test1" for item 1 has any number other than 93 in as the first 2 digits
i want to dash out the ft and inches field, take the numbers in ft and inches, add them together and place it at the end of "T.O.E." field
(see before and after pics)
or if there is a dash where "T.O.E." is, to replace the dash with the added number.
this would of course have to step through the whole list and change the each of fields accordingly.
i have the code to compare the inches and the first 2 digits if they arent 93, take the numbers in the ft and inches field and add them up.
my approach:
ive try to get the nth of the item in the list and entmod it by that way. it however doesnt change the nth, it grabs a random nth of the same value.
example:
(nth 60 mainlst)
will return the whatever is listed from mainlst that corresponds with the inches field for item 1 in the BOM
so if the number is 1 3/4 and somewhere else there is a 1 3/4 it will change that instead of the (nth 60 mainlst)
my issue:
getting the fields to change if the conditions are met then swap out the fields in the list before writting it to a file.
like i said i think i got the changing of the list before its written to a file down.
ive posted the code in the first post here of what i was attempting to use, most likely im approaching this the wrong way.
im looking for guidance on how to get to where im going.
im not looking for anyone to write major code for me, maybe a couple lines to help me understand where i went wrong.
i apologize for my vague posts and i hope this paints a more clear picture.