Jump to content

Recommended Posts

Posted

Hi,

I am looking for some help with outputting point elevations in a format similar to that of nautical charts (see attached).  My survey software can export a number of formats including DWG and DXF.  I have been using autoCAD for basic drafting in the past and feel this is a little out of my league.  i will have a number of projects coming up that will require this and any help now would be greatly appreciated.  i have uploaded a sample of the data of what i normally export from my survey software (Magnet Office).

Many Thanks

Peter

SurveyData.dwg

Chart example.PNG

Posted

Whereas I don't know an automatic way to achieve this, here is a picture of what I produced.

I first changed the text to Mtext, and then in the text editor deleted the minus sign and typed a carat (2^3) between the digits. Then I stacked the second digit which went to subscript.

Perhaps someone, knowing the steps, can produce an automatic way!

Bathymetric text.PNG

  • Thanks 1
Posted

Thank you Eldon, 

I tried to replicate your process and was able to load a script to bulk changes the txt to Mtxt.  I then replaced the decimal with ^, however did not change to subscript.  I'm clearly missing something.  what command should i be looking for to subscript and stack the decimal?

Cheers again for your help.

Peter

Cad trial image.PNG

Posted

Ok if you look at what a text looks like and a mtext looks like

TextString as text = "-1.2"

TextString as mtext = "\\A1;-1{\\H0.7x;\\S^2;}"

You need to read the "textstring" and rewrite the "textstring" for mtetxt using a lisp is pretty straight forward if I had one, now for some time.

I have some other stuff for magnet, remove point cross, ren number code layers to alpha etc Yes I am in AUS.

  • Thanks 1
Posted

Cheers Bigal,

I will have more of a look and play around.  I am currently trying to get a label style that accounts for the soundings, however it involves converting points to cogo points and then modifying the label.  however not quite there yet and then it opens all the dramas with trying to plot .

happily look at anything you have for Magnet.

 

Thanks again

Posted
9 hours ago, hawksy2 said:

......... txt to Mtxt.  I then replaced the decimal with ^, however did not change to subscript.  I'm clearly missing something.  what command should i be looking for to subscript and stack the decimal?

 

The process to stack text is manual, and has to be done for each occurrence. In the Mtext editor, one must highlight the "^1" and then a stack button on the formatting bar becomes available. It looks like "a/b". Then whilst the stacked text is still highlighted, right click it and look for Properties, and then choose Position in the Appearance box and click on Center.

But if you have to do the whole drawing, go for BIGAL's approach where you put the formatting characters in the text before you turn it into Mtext.

Posted

Nearly had it finished and left it at work. Watching the oven timer tick down.

Posted
; change decimal to subscript
; By Alan H Aug 2018
;https://www.cadtutor.net/forum/topic/65850-point-elevation-as-nautical-chart-depths/

(defun convbaram ( / obj lay ss pos)
(setq obj (vlax-ename->vla-object (car (entsel "Pick a text for layer filter"))))
(setq lay (vla-get-layer obj))
(setq ss (ssget "X" (list (cons 0 "texT")(cons 8 lay))))
(repeat (setq x (sslength ss))
(setq ent (ssname ss (setq x (- x 1))))
(setq txt (cdr (assoc 1 (entget ent))))
(setq pos (vl-string-search "." txt))
(setq txtint (substr txt 1 pos ))
(setq txtfrac (substr txt (+ pos 2)  ))
(setq txtnew (strcat "\\A1;"  txtint "{\\H0.7x;\\S^" txtfrac  ";}"))
(command "_.txt2mtxt" ent "")
(setq obj (vlax-ename->vla-object (entlast)))
(vla-put-textstring obj txtnew)
)
)
(convbaram)

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...