progeCAD support, tips and troubleshooting forum. progeCAD works very similar to some versions of AutoCAD. Moderated.

Moderators: caddit, Moderators

#2138 by MelatCMC
Mon Apr 21, 2014 5:40 pm
I remember way back when, when you could create a line of text with a circular justification. The text would be justified to say a arc. We work with autocad 2012 and I was wondering if anyone knew how to do this with this version.

#2141 by caddit
Mon May 05, 2014 2:16 pm
Sorry MelatCMC for the delay a few of us still on holiday leave last week.

You would need to use an autolisp script to accomplish this in progeCAD. There are many to choose from here is one well known version:

Code: Select all;From CADENCE Magazine Febuary, 1989
;Page 56

 (DEFUN CCWTXT ()
    (IF (> STOP STRT)
       (SETQ TANG (- STOP STRT))
       (SETQ TANG (- (* 2 PI) (ABS (- STOP STRT)))))
    (NUMCHAR)
    (SETQ ANG (/ (ABS TANG) (- DL 1))
          CNT 1
          TX (SUBSTR D 1 1)
          SLOPE (/ (+ STRT (/ PI 2)) 0.0174533)
          P (POLAR A STRT R))
    (REPEAT DL
       (COMMAND "text" "m" P H SLOPE TX)
       (SETQ STRT (+ STRT ANG)
             P (POLAR A STRT R)
             CNT (+ CNT 1)
             TX (SUBSTR D CNT 1)
             SLOPE (/ (+ STRT (/ PI 2)) 0.0174533)))
    (PRINC))

 (DEFUN CWTXT ()
    (IF (> STRT STOP)
       (SETQ TANG (- STRT STOP))
       (SETQ TANG (- (* 2 PI) (ABS (- STRT STOP)))))
    (NUMCHAR)
    (SETQ ANG (/ (ABS TANG) (- DL 1))
          CNT 1
          TX (SUBSTR D 1 1)
          SLOPE (/ (- STRT (/ PI 2)) 0.0174533)
          P B)
    (REPEAT DL
       (COMMAND "text" "m" P H SLOPE TX)
       (SETQ STRT (- STRT ANG)
             P (POLAR A STRT R)
             CNT (+ CNT 1)
             TX (SUBSTR D CNT 1)
             SLOPE (/ (- STRT (/ PI 2)) 0.0174533)))
    (PRINC))

 (DEFUN NUMCHAR ()
    (SETQ CARC (* (* 2 PI R) (/ (ABS TANG) (* PI 2)))
          QTY (FIX (/ CARC (* H 0.92))))
    (IF (< QTY 1)(SETQ QTY 1))
    (PROMPT "\n Arc will accomodate approx  ")
    (PROMPT (ITOA QTY))
    (PROMPT " characters ")
    (PROMPT (RTOS H 2 3))
    (PROMPT " high, w/normal spacing.")
    (SETQ D (GETSTRING T "\n Enter text...  ")
          DL (STRLEN D))
    (IF (= DL 1)(SETQ DL 2)))

 (DEFUN C:CIRTXT ()
    (SETVAR "cmdecho" 0)
    (PROMPT "\n>>>> Function To Place Text On A Circle <<<<")
    (SETQ A (GETPOINT "\n       Pick Center of Circular Text  ")
          B (GETPOINT "\n       Pick Middle of First Text Character  ")
          C (GETPOINT "\n       Pick Middle of Last Text Character  ")
          H (GETDIST "\n       Enter text height..... ")
          R (DISTANCE A B)
          STRT (ANGLE A B)
          STOP (ANGLE A C))
    (PROMPT "\n Characters may be written in either direction on the circle.  ")
    (INITGET 1 "CW CCW")
    (SETQ Z (GETKWORD "\nType <CW> for Clockwise or <CCW> for CntrClockwise: "))
    (COND
       ((= Z "CW")(CWTXT))
       ((= Z "CCW")(CCWTXT)))
(princ))



Save the AutoLISP program as a text file like "cirtext.lsp" and load using the APPLOAD command in progeCAD. This will define a new command CIRTXT for what you need.

#2143 by MelatCMC
Tue May 06, 2014 6:29 pm
Copy and pasted the code below to notepad. Saved it as a .lsp file. Appload the file. Say it was loaded successfully, but it is coming in ghosted. When I type it in at the command prompt, it tells me it is an unknown command. What haven't I done or done correctly?

#2155 by caddit
Wed May 21, 2014 3:38 pm
Sorry for the delayed response we are working with some new projects at the moment.


It is hard to know why the script does not work for you. We tested it in our lab environment for progeCAD 2014 and it works as expected:

Image


Are you remembering to select the lsp file from the appload list and click the "load" button after adding it? It WILL return the name of the callable command to the prompt like so:
Code: Select allC:CIRTXT


Afterward just run it by typing "CIRTXT" and follow the in-command instructions.
#2163 by MelatCMC
Thu Jun 12, 2014 1:52 pm
Thank you, did as instructed and it works like a charm.
The time I needed it is passed but I am sure that it will come in handy at a later time.

Mel

Recent Topics

User avatar Reloading ProgeCad2016

by caddit

Wed Apr 05, 2017 11:33 pm

Default Avatar Start ProgeCad by C# dll Error

by ftauto

Mon Mar 20, 2017 3:44 pm

User avatar Mathcad Prime 4.0 Released

by caddit

Wed Mar 08, 2017 10:40 pm

User avatar Lisp routine help

by caddit

Wed Mar 08, 2017 10:30 pm

Default Avatar Classic/Ribbon menu help

by SClapham

Sun Feb 19, 2017 11:04 am

Twitter

About Us

Welcome to Ausstralia/New Zealand's CADDIT CAD software forum. CAD CAM Forum for support and discussion regarding AutoCAD, progeCAD IntelliCAD, Geomagic Freeform, Mathcad, CNC software.

This forum offers free support for progeCAD by qualified technical staff. Thank you for visiting.

CADDIT.net

The CADDIT.net team