Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Center Line Symbol

16 REPLIES 16
Reply
Message 1 of 17
Anonymous
3132 Views, 16 Replies

Center Line Symbol

Would anyone know of a method, using Visual Lisp, that would alow me to
insert a center line symbol block to an existing dimension line and allow it
to be rotated and scaled to the dimensions properties? Any help would be
greatly appreciated!

Thanks,
Mark
16 REPLIES 16
Message 2 of 17
Anonymous
in reply to: Anonymous

lsp to insert centerline block? Make a block and insert into dimension
line that has been exploded. Or do you want centerline symbol to insert
in centerline? Do you want font that has centerline symbol?
Message 3 of 17
Anonymous
in reply to: Anonymous

Walt,

Sorry for the confusion. I basically would need to insert a block below the
dimension value similar to what is shown on the attached file. I already
have the block I'm just looking for a quick way to insert the block on a
selected set of dimensions.

Thanks,
Mark

"Walt Engle" wrote in message
news:4923114@discussion.autodesk.com...
lsp to insert centerline block? Make a block and insert into dimension
line that has been exploded. Or do you want centerline symbol to insert
in centerline? Do you want font that has centerline symbol?
Message 4 of 17
Anonymous
in reply to: Anonymous

Not a problem. To have dim text above and below dim line, us *\X * and
the following text will be below dim line. MUST USE UPPER CASE X.As soon
as I can, I will find the shx file that has the CL symbol.
Message 5 of 17
Anonymous
in reply to: Anonymous

Walt,

I'm aware of the formatting to get text below or above a dimension line.
This is an older font the company would like to keep using. When using plain
text all that is needed to get the CL string, for this particular font, is
to type %%130. The problem is that this formatting does not work with mtext
(which dimensions use) so my work around is to use a block. I'm just having
trouble finding the right "vla" functions to get the needed info from the
dimensions to account for rotation, etc.

Thanks,
Mark

"Walt Engle" wrote in message
news:4923125@discussion.autodesk.com...
Not a problem. To have dim text above and below dim line, us *\X * and
the following text will be below dim line. MUST USE UPPER CASE X.As soon
as I can, I will find the shx file that has the CL symbol.
Message 6 of 17
Anonymous
in reply to: Anonymous

Ok - here's something you can do: use Romansx5.shx. The code for CL
symbols is \U2104. So, you can copy and paste "\X\U2104 to \U2104"
(without the quotes) to add to your edited dim text. Example: if your
dimension is 5", edit it so that it reads 5"\X\U2104 to \U2104. I am
attaching romansx5.dwg as a zip file.
Message 7 of 17
Anonymous
in reply to: Anonymous

attaching
Message 8 of 17
Anonymous
in reply to: Anonymous

Attaching
Message 9 of 17
Anonymous
in reply to: Anonymous

I understand. I too have a font that mtext doesn't like but the font I
sent (shp, dwg and shx) is a Romans font and you can use \U2104.
Message 10 of 17
hmsilva
in reply to: Anonymous

Hy Mark

Try this...

\U+2104

Cheers

Henrique

EESignature

Message 11 of 17
Anonymous
in reply to: Anonymous

Walt,

I have to keep the same font so your solution using the "romans" font will
not work. I would like to use the block route for now. Do you have any
suggestions on what "vla" functions to use?

Thanks,
Mark

"Walt Engle" wrote in message
news:4923181@discussion.autodesk.com...
I understand. I too have a font that mtext doesn't like but the font I
sent (shp, dwg and shx) is a Romans font and you can use \U2104.
Message 12 of 17
Anonymous
in reply to: Anonymous

Hmsilva,

All I get when using your suggestion is a ?.

Thanks,
Mark

wrote in message news:4923311@discussion.autodesk.com...
Hy Mark

Try this...

\U+2104

Cheers

Henrique
Message 13 of 17
Anonymous
in reply to: Anonymous

What font are you using?
I suspect that the reason Mtext won't work is that the font is not encoded
as a unicode font.
If you recompile it into a unicode font, the CL symbol will work correctly.
See Help on unicode fonts.
I've written a utility that helps convert non unicode fonts to unicode
fonts.
If you would like me to try to recompile the font as a unicode font, post
your shx file and let me know.

P.S. Recompiling the font as unicode won't change the appearance of the
font. It just adds functionality for Mtext. It still works and looks the
same in Text (DText) objects.
Message 14 of 17
Anonymous
in reply to: Anonymous

Thanks Allen! Please find attached the font for your use.

Thanks,
Mark

"Allen Johnson" wrote in message
news:4923411@discussion.autodesk.com...
What font are you using?
I suspect that the reason Mtext won't work is that the font is not encoded
as a unicode font.
If you recompile it into a unicode font, the CL symbol will work correctly.
See Help on unicode fonts.
I've written a utility that helps convert non unicode fonts to unicode
fonts.
If you would like me to try to recompile the font as a unicode font, post
your shx file and let me know.

P.S. Recompiling the font as unicode won't change the appearance of the
font. It just adds functionality for Mtext. It still works and looks the
same in Text (DText) objects.
Message 15 of 17
Anonymous
in reply to: Anonymous

See if this can get you where you want to go. Once you select a dimension, then it will search for the block that is associated with that dimension, and print the name of the text style. You can change it to do what you want once you get the text object because then you can find out where it is and the angle so that you can add your block in the right location.

Tim

(defun c:DimText (/ ActDoc BlkCol tmpEnt tmpEntData BlkName Blk TxtObj)
; Prints the name of the text style of the selected dimension.

(vl-load-com)
(setq ActDoc (vla-get-ActiveDocument (vlax-get-Acad-Object)))
(setq BlkCol (vla-get-Blocks ActDoc))
(if
(and
(setq tmpEnt (entsel "\n Select dimension: "))
(setq tmpEntData (entget (car tmpEnt)))
(= (cdr (assoc 0 tmpEntData)) "DIMENSION")
)
(progn
(setq BlkName (cdr (assoc 2 tmpEntData)))
(setq Blk (vla-Item BlkCol BlkName))
(vlax-for Obj Blk
(if (= (vla-get-ObjectName Obj) "AcDbMText")
(setq TxtObj Obj)
)
)
(prompt (strcat "\n Text style name is: " (vla-get-StyleName TxtObj)))
)
)
(princ)
)
Message 16 of 17
Anonymous
in reply to: Anonymous

We use some arch... fonts (archquik.shx, architxt.shx and archtitl.shx)
that we bought from a now-defunct company called Digital Architect
Software. They are really nice architectural hand-lettering fonts, with
centerline, property line, delta, diameter, and stacked fraction
characters, etc., but they are the old decimal-encoded fonts and they
don't
display correctly when used in Mtext (they still work as Dtext, go
figure...).

I could furnish you the shp or shx files -- do you think you'd want to
extend that offer to us, too? It'd be awesome to get control of these
fonts in mtext.

TIA,
Randy Benson


"Mark" wrote in message
news:4923475@discussion.autodesk.com...
Thanks Allen! Please find attached the font for your use.

Thanks,
Mark

"Allen Johnson" wrote in message
news:4923411@discussion.autodesk.com...
What font are you using?
I suspect that the reason Mtext won't work is that the font is not
encoded
as a unicode font.
If you recompile it into a unicode font, the CL symbol will work
correctly.
See Help on unicode fonts.
I've written a utility that helps convert non unicode fonts to unicode
fonts.
If you would like me to try to re
compile the font as a unicode font, post
your shx file and let me know.

P.S. Recompiling the font as unicode won't change the appearance of the
font. It just adds functionality for Mtext. It still works and looks
the
same in Text (DText) objects.
Message 17 of 17
Anonymous
in reply to: Anonymous

Woops -- I replied to Mark when I meant to ask you to extend your offer
of recompilation to Archquik, Architxt and Archtitl (oh, and the mono-
versions, if possible). I bought them all years ago from 'Digital
Architect Software', now defunct.

Thanks again (still) In Advance,
Randy Benson


"Allen Johnson" wrote in message
news:4923411@discussion.autodesk.com...
What font are you using?
I suspect that the reason Mtext won't work is that the font is not
encoded
as a unicode font.
If you recompile it into a unicode font, the CL symbol will work
correctly.
See Help on unicode fonts.
I've written a utility that helps convert non unicode fonts to unicode
fonts.
If you would like me to try to recompile the font as a unicode font,
post
your shx file and let me know.

P.S. Recompiling the font as unicode won't change the appearance of the
font. It just adds functionality for Mtext. It still works and looks
the
same in Text (DText) objects.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

AutoCAD Inside the Factory


Autodesk Design & Make Report