Community
PowerMill Forum
Welcome to Autodesk’s PowerMill Forums. Share your knowledge, ask questions, and explore popular PowerMill topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Curve editor macro

9 REPLIES 9
SOLVED
Reply
Message 1 of 10
jsweatherbie
393 Views, 9 Replies

Curve editor macro

im making a macro to create text and i seen something on here about that but it didnt work and anything ive made just breaks. 
the macro is supposed to ask what text you want and it creates text at cord 0,0,0 .......... sets the text size and font.

 

THIS IS WHAT I MADE:

//SELECT A TOOL
string toolSelected = input entity Tool "Choose a tool"

ACTIVATE Tool $toolSelected

CREATE PATTERN ; "ENGRAVING"

EDIT PATTERN ; CURVEEDITOR START

CURVEEDITOR MODE TEXT_HORIZONTAL

MODE POSITION START

MODE POSITION CARTESIAN X "0"
MODE POSITION CARTESIAN Y "0"
MODE POSITION CARTESIAN Z "0"
POSITION APPLY

//FONT SETTINGS 
CURVEEDITOR TEXT FONT_SIZE ".125"

CURVEEDITOR TEXT FONT_FACE "Delcam Gothic"

 

 THIS IS WHAT THE OTHER POST HAD:

IF NOT entity_exists('pattern','') {
 RETURN
}
STRING p=entity('pattern','').Name
STRING t=Input 'Text?'
$t='CURVEEDITOR TEXT SET_TEXT "\F \C!4\H ]\S \B \I \U '+$t+'"'
ACTIVATE Pattern $p
EDIT PATTERN $p CURVEEDITOR NOGUI START
CURVEEDITOR MODE TEXT_HORIZONTAL
MODE COORDINPUT COORDINATES 0 0 0
DoCommand $t
CURVEEDITOR TEXT FINISH
CURVEEDITOR FINISH ACCEPT

from the other post it works untill "DoCommand" then it errors 

9 REPLIES 9
Message 2 of 10
icse
in reply to: jsweatherbie

try this:

 

string $input = input 'Text:'

string $patternName = 'ENGRAVING'
if entity_exists('pattern',$patternName) {
	$patternName = new_entity_name('pattern',$patternName)
}
create pattern ${patternName}
EDIT PATTERN ${patternName} CURVEEDITOR START
CURVEEDITOR MODE TEXT_HORIZONTAL
MODE COORDINPUT COORDINATES 0 0 0

string $cmd = 'CURVEEDITOR TEXT SET_TEXT "\V{1}\F{Delcam Gothic;TT}\C{ffffffff}\H{5}\S{0}\B{0}\I{0}\U{0}' + $input + '"'
DoCommand $cmd

CURVEEDITOR TEXT FINISH
CURVEEDITOR FINISH ACCEPT
Message 3 of 10

At the risk of asking a silly question, have you tried the Text creator plugin that ships with Powermill, i find its does a good job

kevinhammond3WX4X_0-1721890932297.png

 

Message 4 of 10
evo80
in reply to: kevin.hammond3WX4X

Hmmm,

I had this once upon a time but for some reason it seems to have gone, is there a link to this plugin?

Regards Jon K

Message 5 of 10
kevin.hammond3WX4X
in reply to: evo80

C:\Program Files\Autodesk\PowerMill 2025\file\plugins\installers\plugins

 

kevinhammond3WX4X_0-1721907448185.png

 

Message 6 of 10
evo80
in reply to: kevin.hammond3WX4X

Aaah, there it is!

Cheers Kevin!

Message 7 of 10
evo80
in reply to: jsweatherbie

Delcam San Serif looks a bit weird??

Message 8 of 10
kevin.hammond3WX4X
in reply to: evo80

Alright on my telly , i have attached the delcam fonts i could find on my pc from C:\Windows\Fonts.

Try one of these to see if it helps.

Also note, in case you are not aware, that clicking the 'A' box on the font line toggles between all fonts and single line fonts.

kevinhammond3WX4X_0-1721910836144.png

 

Message 9 of 10
evo80
in reply to: kevin.hammond3WX4X

Toggling the 'A' box to single line fonts rectified the issue.

Thanks for the tip!

Message 10 of 10
jsweatherbie
in reply to: icse

youre a life saver and a headache saver

 

 

@jsweatherbie - this post has been edited due to Community Rules & Etiquette violation.

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

Post to forums  

Autodesk Design & Make Report