Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

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

Maybe you could substitute the " for something like §§§ first, then substitute your values and then substitute §§§ for " again?

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.

  • 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

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

  • 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

Perhaps

Substitute ( OffsetX_A; "OFFSETX="40""; "OFFSETX="80"" )

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

  • 1 year later...
  • 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

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

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.