3d Surface from 2d text height point

Hello

a long time ago (  few or more years ) as i remember - someone from us ( communities ) make a script  vba or something

to make a surface from  2d text  on map  (  for example  31.2 ,  32.4  etc ... )

Maybe someone remember this or can help ?  I need to make sufrace from points but there are 2d

As i remember this script put text on level from text and than connect it to mesh ?

Martin

Parents
  • For Mstn V8i users  I have  posted before a old bas macro (ExtractText ) that  will extract the xy and Text   of a 2d Text file and create a txt or csv file  you can then us import coordinates tool and this text file to create 3d points in an 3d file and then use the  3d tools  to create a surface from those points...  it  works off the  justification as the xyz location..

    So you  need to look at your file carefully to work out if the  white crosses are ( if the are not txt node markers) but are where  where you need the text to originate from, there is an mdl in the utilities section here that will change your  text justification without moving the text ( a really useful utility) , I would set the  justification to centre center then change all the text centre centre next  I would select all the  text and  move it  so the the text justification is  aligned with the survey  spot height crosses... then run the ExtractText.bas  to recreate the  spot height  survey coordinate text file...FYI you may need to edit the  bas or create the folder  for it to save it defaults is "C:\temp\ExtText.csv"

    If anybody would take on converting this very useful  bas into vba I'm sure we would all benefit.

    0116.ExtractText.zip

    Lorys

    Started msnt work 1990 - Retired  Nov 2022 ( oh boy am I old )

    But was long time user V8iss10 (8.11.09.919) dabbler CE  update 16 (10.16.00.80) 

    MicroStation user since 1990 Melbourne Australia.
    click link to PM me 

  • Unknown said:
    run the ExtractText.bas  to recreate the  spot height  survey coordinate text file

    I examined the code in that macro.  It writes lines similar to 'nnn',1,2,3 where 1,2,3 is the text origin.  You still must do some work to convert 'nnn' to a number and substitute that for the Z coordinate.  In other words, it's no different to using the XYZ Text tool built-in to MicroStation.

     
    Regards, Jon Summers
    LA Solutions

  • Once again, I used CONNECT's reporting tools to create an Excel list of coordinates.

    Krz-Kopia.xlsx

    Not every point has a height -- some have a character string such as 'X'.

    The data are in columns Text, Level Name, Coordinates.  The coordinates are a comma-separated string x,y,z. Z is, of course, zero.

    What you need to to:

    1. Edit the worksheet to remove those rows that don't have a valid Z-value in your text
    2. Edit the worksheet to separate the x,y,z text into separate columns
      • You might want to write a macro to do that.  Search the web for examples
    3. Copy the Z value from your Text column into the new Z colum
      • That gives you a set of x,y,z values with a valid elevation
    4. Save the worksheet as a CSV file
    5. Use XYZ Import to import the CSV file

     
    Regards, Jon Summers
    LA Solutions

  • Thank you Jon !

    Yes working now .  Microsoft Excel have option to separate text to columns so easier .

    Martin

  • Hi Jon can you help once again ?

    I can't do this with this file  - can you change to 3d this ?  I try even Roads Designer but nothing help

    test2.dgn

  • I can't do this with this file

    I used the exporter macro to create a CSV file from your DGN model.  Here's a small extract...

    199.8, 7428930.45, 5545502.09, 10.20
    199.7, 7428941.88, 5545428.36, 10.20
    199.7, 7428924.39, 5545432.57, 10.20
    199.6, 7428959.58, 5545425.34, 10.20
    199.5, 7428942.98, 5545452.84, 10.20
    199.5, 7429027.53, 5545451.86, 10.20
    199.7, 7429050.23, 5545435.13, 10.20
    199.4, 7429074.21, 5545456.27, 10.20
    

    The first column has the Z coordinate from the displayed text.  The second and third columns are the X, Y coordinate of that text.  The fourth column is the Z coordinate of that text.

    You can choose to export the data differently: X, Y and Z taken from the text value.

    You need to move the first column to the third column so you have the required X, Y, Z coordinates.  Discard the unwanted fourth column...

    428930.45, 5545502.09, 199.8
    428941.88, 5545428.36, 199.7
    428924.39, 5545432.57, 199.7
    428959.58, 5545425.34, 199.6
    428942.98, 5545452.84, 199.5
    429027.53, 5545451.86, 199.5
    429050.23, 5545435.13, 199.7
    429074.21, 5545456.27, 199.4
    

    The reordered coordinates are attached:

    martinezx-test2-ordered.csv

     
    Regards, Jon Summers
    LA Solutions

  • Thank you Jon

    i try your old macro but have problem with divide columns in office , i have only commas / not dots in numbers / and hard to separate this  

    IS this a new macro ? 

    Btw why yours macro can't make  Z on the end  and you need to move it by hand ? 

Reply Children