Jump to content

Recommended Posts

Posted

Lee,

 

I think depending on the release that you will need to have to do some checking for monospace font access. You will get some automatic font substituting that could cause problems.

 

Also, a lot of Windows mono fonts aren't truely monospaced. So maybe find a none acad shx font and load it. -David

  • Replies 66
  • Created
  • Last Reply

Top Posters In This Topic

  • Lee Mac

    23

  • CadProWannabe

    12

  • eldon

    8

  • wizman

    8

Top Posters In This Topic

Posted Images

Posted
I think depending on the release that you will need to have to do some checking for monospace font access. You will get some automatic font substituting that could cause problems.

 

True, I was thinking perhaps just:

 

(findfile "C:\\Windows\\Fonts\\monos.ttf")

 

So maybe find a none acad shx font and load it

 

Sorry David, could you possibly elaborate on this?

 

Many thanks,

 

Lee

Posted
Lee,

 

So maybe find a none acad shx font and load it. -David

 

Lee,

 

Sorry a typo on my part.

 

''mono acad shx font'

 

-David

Posted

The technical term is kerning monotext has a kern of 1 meaning every character is drawn in the same size box hence the decimal point is the same width as a W. In most ttf a AW is as it looks the W creeps towards the A. A AI is less width than the AW.

 

To put a spanner in the works a problem with using various fonts is that the decimal point can move vertically. Sometimes its located at the centre of the text and not just at the bottom.

 

Our other civil software does this as a std option and quite honestly you would not know if it was a sparrows fart away from the correct position. It would only matter if you were to reverse engineer the text. The plotted plans look good and you know the point sureveyed is at the decimal point. If the text is offset slightly is it within the tolerance for the plotted plan ?

 

What I am saying is you do need to pick a font and stick with it else lee Macs good work is in vain.

Posted
What I am saying is you do need to pick a font and stick with it else lee Macs good work is in vain.

 

Thanks for the info BigAl - I had fun playing with the code :)

Posted
If it is for a Hydrographic/ Bathymetric survey, then the plan postion of the soundings is usually to the nearest metre, so it should be more than adequate as it stands. But do not change the size of text later. (this is where a decimal justification would be useful)

 

Bathymetric surveys are about only measuring depths whereas Hydrographic surveys are about mapping and other things including measuring depths.

 

Thanks Eldon,

 

 

Lee, were you able to hit the mark? been very busy today to play..'-)

Posted
Thanks Eldon,

 

 

Lee, were you able to hit the mark? been very busy today to play..'-)

 

Yes, my last code post (#20) should hit the mark, assuming you have Monospace821 font :)

Posted

Thanks Lee, No CAD here installed in this machine, i will try it tomorrow

Posted
Thanks Lee, No CAD here installed in this machine, i will try it tomorrow

 

Thanks Wiz :)

Posted

When I load lees program the text for the elevation just reads 0.00 what is causing this to happen. It does not seem to be extracting the elevation. I appreciate everybody's feedback on this topic. Thank You very much. I am looking for this to work for topographic surveys where we need to show spot shot elevations and the decimal point being where the shot was taken. I think if there is so much problems caused by font type and size if the program can just create the intial text it would not be hard to just drag the text entity's decimal point over to the node from where the shot was taken. The next step if anyone wants to tackle it, is to have the program determine if the point is a ground shot (GRN, GRN GB, T24 GRN) then it would annotate to th nearest tenth (00.0) and if it is not a ground shot then it would annotate to nearest hundreth (00.00)

Posted

Try this one:

 

(defun c:tpt (/ Make_Text pt BoxNum BoxHgt BoxWid)
 ;; Lee Mac, David Bethel & Wizman  ~  10.01.10 (= 38)
 
 (setvar 'dimzin 0)
  
 (defun Make_Text (pt val)

   (setq pt1 (polar pt (atan BoxHgt   (* BoxNum BoxWid)) 
                       (sqrt (+ (expt (* BoxNum BoxWid) 2)
                                (expt BoxHgt 2)))))
   
   (entmakex (list (cons 0   "MTEXT")
                   (cons 100 "AcDbEntity")
                   (cons 100 "AcDbMText")
                   (cons 71 3)
                   (list 10 (car pt1) (cadr pt1) (caddr pt))
                   (cons 40 (getvar 'TEXTSIZE))
                   (cons 1  (strcat "{\\fMonospac821 BT|b0|i0|c0|p49;" val "}")))))

 (setq BoxNum (+ 0.412636   (getvar 'LUPREC))
       BoxHgt (* 0.892748   (getvar 'TEXTSIZE))
       BoxWid (* (/ 13 15.) (getvar 'TEXTSIZE)))

 (while (setq pt (getpoint "\nPick Point: "))
   (Make_Text pt (rtos (caddr (trans pt 1 0)))))

 (princ))

Posted

Did you have the Node osnap activated? I did and it worked perfectly for me.

Posted
Did you have the Node osnap activated? I did and it worked perfectly for me.

 

Surely that shouldn't make a difference... :geek:

Posted

Lee I tried the new code it places the text perfectly over the node, but I still get zero's (0.00) the elevation on the point is 123.34

Posted

Level on Right clicked on point. Level on left, clicked on point with Node Osnap

SpotLevels.jpg

Posted

exmp.jpg

 

This is what I am getting. I type TPT to start the command and activate the osnap node selection and I get 0.00's

Posted

I cannot see your node. Perhaps your Osnap should be Insertion :o

Posted

examplelt.jpg

 

 

I tried insertion and node it seems to work for the text I just can't get it to read the elevation. Is the system variable that reads the elevation different in Autocad 2006 then other versions of cad? could this be the problem. If so what is the variable to extract the elevation out of a autoad object?

Posted

Perhaps your node has been placed with a z value of zero, and the attributes show the elvation in the text. It certainly works to show the z value of a node in AutoCAD 2002.

 

Have you listed your node and block to see whether there is a z value?

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...