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

  • 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 ? 

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

    Here are the export options:

    Text Export Options

    The third one x, y, z from text does what you ask.  You don't need to move the columns by hand if you choose that option.

    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 

    I guess that your computer is using the Polish locale. When you export coordinates, does your CSV look like this...

    123.4, 567.8, 0.123

    Or like this...

    123,4, 567,8, 0,123

    With an English locale, the decimal separator is a dot (period .).  With many non-English locales, the decimal separator is a comma (,).

    I've updated the macro to offer different options for the column separator character.  You can choose between a comma, semi-colon or tab character...

    For example, here are your coordinates using tab separation...

    tab-separated-coordinates.csv

     
    Regards, Jon Summers
    LA Solutions

    Answer Verified By: martinezx 

  • Jon - Polish ;) 

    Look's great .  Thank you very much !

    Old macro  with option x, y, z from text  give me 0  at the end

    Martin

Reply Children