Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 57207
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T17:39:18+00:00 2026-05-10T17:39:18+00:00

I have a text file of this format: L O A D C A

  • 0

I have a text file of this format:

L O A D   C A S E   1   O F   2  ...      J O I N T   D I S P L A C E M E N T S                   (global)       Joint    X-dsp       Y-dsp       Z-dsp       X-rot       Y-rot       Z-rot          1    0.0         0.0         0.0         0.0         0.0        -0.001712          2    0.000646   -0.021756    0.0         0.0         0.0        -0.001339          3    0.003562   -0.038487    0.0         0.0         0.0        -0.000727          4    0.006478   -0.041661    0.0         0.0         0.0         0.000104          5    0.009536   -0.036266    0.0         0.0         0.0         0.000720          6    0.012595   -0.022824    0.0         0.0         0.0         0.001326          7    0.014724    0.0         0.0         0.0         0.0         0.001948          8    0.010000   -0.018686    0.0         0.0         0.0        -0.001117          9    0.009354   -0.036887    0.0         0.0         0.0        -0.000829         10    0.005767   -0.041661    0.0         0.0         0.0         0.000060         11    0.002180   -0.035866    0.0         0.0         0.0         0.000798         12    0.000051   -0.020695    0.0         0.0         0.0         0.001210     M E M B E R   E N D   F O R C E S                   (local)       Member Joint      Nx          Vy         Vz         Txx        Myy        Mzz          1      1    -16.138t      0.002      0.0        0.0        0.0        0.011          1      2     16.138t     -0.002      0.0        0.0        0.0        0.017          2      2    -72.907t      0.003      0.0        0.0        0.0        0.013          2      3     72.907t     -0.003      0.0        0.0        0.0        0.023          3      3    -72.909t     -0.000      0.0        0.0        0.0       -0.009          3      4     72.909t      0.000      0.0        0.0        0.0        0.005          4      4    -76.455t     -0.000      0.0        0.0        0.0       -0.007          4      5     76.455t      0.000      0.0        0.0        0.0        0.003          5      5    -76.453t     -0.001      0.0        0.0        0.0       -0.010          5      6     76.453t      0.001      0.0        0.0        0.0        0.000          6      6    -53.226t     -0.002      0.0        0.0        0.0       -0.018          6      7     53.226t      0.002      0.0        0.0        0.0       -0.008          7      1    108.570c     -0.001      0.0        0.0        0.0       -0.011          7      8   -108.570c      0.001      0.0        0.0        0.0       -0.004          8      2    -76.765t     -0.004      0.0        0.0        0.0       -0.024          8      8     76.765t      0.004      0.0        0.0        0.0       -0.021          9      2     80.278c     -0.000      0.0        0.0        0.0       -0.006          9      9    -80.278c      0.000      0.0        0.0        0.0       -0.000         10      3    -39.997t     -0.002      0.0        0.0        0.0       -0.014         10      9     39.997t      0.002      0.0        0.0        0.0       -0.016         11      4    -23.720t     -0.000      0.0        0.0        0.0        0.004         11      9     23.720t      0.000      0.0        0.0        0.0       -0.007         12      4     -0.001t      0.000      0.0        0.0        0.0        0.002         12     10      0.001t     -0.000      0.0        0.0        0.0        0.001         13      4    -18.706t      0.000      0.0        0.0        0.0       -0.003         13     11     18.706t     -0.000      0.0        0.0        0.0        0.005         14      5    -10.000t      0.001      0.0        0.0        0.0        0.007         14     11     10.000t     -0.001      0.0        0.0        0.0        0.008         15      6     32.845c      0.000      0.0        0.0        0.0        0.006         15     11    -32.845c     -0.000      0.0        0.0        0.0       -0.000         16      6    -53.223t      0.002      0.0        0.0        0.0        0.012         16     12     53.223t     -0.002      0.0        0.0        0.0        0.010         17      7     75.273c      0.000      0.0        0.0        0.0        0.008         17     12    -75.273c     -0.000      0.0        0.0        0.0       -0.001         18      8     16.142c      0.005      0.0        0.0        0.0        0.025         18      9    -16.142c     -0.005      0.0        0.0        0.0        0.030         19      9     89.682c      0.000      0.0        0.0        0.0       -0.007         19     10    -89.682c     -0.000      0.0        0.0        0.0        0.008         20     10     89.682c     -0.000      0.0        0.0        0.0       -0.009         20     11    -89.682c      0.000      0.0        0.0        0.0        0.003         21     11     53.228c     -0.002      0.0        0.0        0.0       -0.016         21     12    -53.228c      0.002      0.0        0.0        0.0       -0.010 

Is there any C# library that can be used to parse the information of this format?

Thanks.

  • 1 1 Answer
  • 1 View
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T17:39:19+00:00Added an answer on May 10, 2026 at 5:39 pm

    Here is a very interesting approach about importing tabulated data using Linq.

    It’s simple and elegant, you only need an Enumerable method that yields the lines from the file:

    public static IEnumerable<string> ReadLinesFromFile(string filename) {     using (StreamReader reader = new StreamReader(filename))     {         while (true)         {             string s = reader.ReadLine();             if (s == null)                 break;             yield return s;         }     } } 

    and then you do the query:

    var jointDisplacements = from line in ReadLinesFromFile(@'c:\import.txt')                let item = line.Split(new char[] { '\t' })                select new                {               Joint = Convert.ToInt32(item[0]),               X-dsp = Convert.ToDouble(item[1]),               Y-dsp = Convert.ToDouble(item[2]),               Z-dsp = Convert.ToDouble(item[3]),               X-rot = Convert.ToDouble(item[4]),               Y-rot = Convert.ToDouble(item[5]),               Z-rot = Convert.ToDouble(item[6])                }; 

    You have now a list of anonymous objects that have the values from your file, represented as properties of each object.

    If your file includes the column headers, you should skip the first line…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hi i have my text file in this format **4 1250000209852 01 XXXX XXXX
I am reading a text file with this format: grrr,some text,45.4321,54.22134 I just have
I have text file format like this SKI SKII SKIII SKIV SKV SKVI SKVII
I have a text file like this: A B C And each element has
if I have a text file like this : this is line one This
I' ve got a problem with Haskell. I have text file looking like this:
I have text file with some text information and i need to split this
I have a text file looks like this : 100 50 20 90 4.07498
I have got this text file with latitude and longitude values of different points
I have a text file that looks like this. A 102 B 456 C

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.