Community
AutoCAD Forum
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

New to scripting - how to pass SMT dialog parameters.

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
joqarmaza
443 Views, 3 Replies

New to scripting - how to pass SMT dialog parameters.

I'm new to autocad and scripting in general but want to automate the SMT command from within a script file.

If you run the command smt in the command line it asks for "select objects..." at this point you can type All and hit enter.

Eventually you get a dialog box for StripMText with types of formatting to remove.  I have written a .scr (script) file like so:

 

smt
All

 

But don't know how to change it to add what formats to remove for instance if I wanted to check the "Width" or "Tabs".

 

Can anyone explain or point me in the right direction to automate this?

test.jpg

3 REPLIES 3
Message 2 of 4
pendean
in reply to: joqarmaza

You don't: pop-ups are not accessible that way, they require user/mouse input.

Contact that lisp creator for a no-popup version.
Message 3 of 4
joqarmaza
in reply to: pendean

Well I understand that but read the documentation from that programmer here:

 

http://forums.autodesk.com/autodesk/attachments/autodesk/706/30050/1/StripMtext%20v5-0c.txt

 

It states the following midway through, which tells me this IS in fact possible:

 

Example 2:
;;;;
;;;;  Prompt the user to select objects and remove only color, font, &
;;;;  height formatting.  There will not be a dialog or any other prompt
;;;;  for choosing formats.
;;;;
;;;;  (if (setq ss (ssget)) (StripMtext ss "CFH"))
;;;;   - OR -
;;;;  (if (setq ss (ssget)) (StripMtext ss '("C" "F" "H")))
Message 4 of 4
joqarmaza
in reply to: pendean

I got it using this command:

 

(StripMtext (ssget "x") '("C" "F" "H" "W"))

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

Post to forums  

Autodesk Design & Make Report

”Boost