June 2, 200916 yr Hi there a little stuck on this one. I have another software package that I need to reguarly change data inside the text file from FMP 10. The data from FMP is (field name) StartX = 240 I want to substitute calculation (or Other) of the text file StartX ="40" to The data from FMP is (field name - StartX) = 240. I need FMP to search the full StartX ="40" to the substitute The data in the text file has a lot of ("") around the data that I want to change. The ("") is required in the text file for the software package to work. When I create the substitute, anything with ("") FMP seams to think it is a field and won't substitute
June 2, 200916 yr Maybe you could substitute the " for something like §§§ first, then substitute your values and then substitute §§§ for " again?
June 2, 200916 yr Could you please clarify what exactly is your fields names and what is your data/calculations?? It is rather confusing. Perhaps you can make a list like such: FieldNames: Data: Calcs: Also the Escape character in FM is Therefore you can make searches as such: "something" will find "something" literally.
June 3, 200916 yr Author Hope this is a little clearer Field Name = OffsetX_A Data in Field = 80 Text Line to substitute= bla bla bla... OFFSETX="40" so if it finds OFFSETX="40" substitute it with OFFSETX="80" from the field name OffsetX_A
June 3, 200916 yr so if it finds OFFSETX="40" substitute it with OFFSETX="80" from the field name OffsetX_A I was with you right up until you said field name OffsetX_A Can you attach a copy of the file so we can verify your needs. Lee
June 5, 200916 yr Author Part of the text file that i want to substitite.... see all the "" NOME="1LFL.PAN" X=2500.0000 Y=600.0000 Z=33.0000 CNFT="1" XS=4281.0000 CS=0.0000 STRET=0 FILABAT=1 RUOTE=1 ACC=0 OFFSETORI=0 MM_P=0 CNFTP="1" B_SYMBOL X="2500.0000" Y="600.0000" Z="33.0000" LZIP="85" L="95" S="50" N="0" 1111111111111111111111111111111111111111111111="11111111111111111111111111111111111" [color:red]OFFSETX="80" LENGTH="2000" WIDTH="600" CNR_C="0" ROUND_CNR="N" FEM_LEFT="600" TOG_LEFT="L" FBL="80" BBL="80" 1111111111111111111111111111111111111111111111="11111111111111111111111111111111111" B_RADIUS="12.8" B_DEPTH="20" DEPTH="35" DEPTH2="35" M_DEPTH="25" F_RADIUS="25" 2222222222222222222222222222222222222222222222="22222222222222222222222222222222222" CAL1="(FEM_LEFT-FBL-BBL)/3+FBL" CAL2="(FEM_LEFT-(FEM_LEFT-FBL-BBL
June 5, 200916 yr There might be an error in your posts. The Substitute Calculation provided by Mr. Vodka matches your description of what you want to find and replace. However, the sample of text you posted, doesn't contain the find string, but it does contain the replacement text? If it is suppose to be the opposite, just exchange the two strings. Lee
October 25, 201015 yr Author Hi Lee Back on this again (substitute) Do you Now if there is a limit to the number of substitutions [color:green]This part is working [color:blue]Substitute (MachineCode; ["OFFSETX="40""; "OFFSETX="" & OffsetX_A&"""]; ["LENGTH="2000""; "LENGTH="" & AMachineFinalLength&"""]; ["WIDTH="600""; "WIDTH="" & AFinalSizeWidth&"""]; ["FEM_RIGHT="600""; "FEM_RIGHT ="" & AFemaleC&"""]; ["TOG_LEFT="L""; "TOG_LEFT ="" & TogglesA_Left&"""]; ["TOG_RIGHT="L""; "TOG_RIGHT ="" & TogglesA_Right&"""]; [color:red]But from here down it stops [color:blue]["FBL ="80""; "FBL ="" & AFBL&"""]; ["FBR ="80""; "FBR ="" & AFBR&"""]; ["BBL ="80""; "BBL ="" & ABBL&"""]; ["BBR ="80""; "BBR ="" & ABBR&"""]; ["B_RADIUS ="13.8""; "B_RADIUS ="" & AMachineFinalLength&"""] ) Any ideas?? We have a machine that works ofa Text files some 1200 in all that cut various shapes. These text files are used all the time, without me rewritting them for example the Length and Width, (FMPro already has this info), I want to substitute approx 50 field within the text files from FMPro
October 25, 201015 yr Is there a reason why the last five substitutions have a space between the parameter name and the equation sign, but the top six do not?
Create an account or sign in to comment