AutoCAD 2013/2014/2015

Reply
Member
DRLTKSE
Posts: 5
Registered: ‎11-07-2012
Message 1 of 6 (360 Views)

Macro/Custom Button for CONVERTPSTYLES

360 Views, 5 Replies
11-09-2012 04:25 AM

Hi All,

 

I have used this forum to solve my problems for a long time but I have a problem I cannot find the answer to.

 

I want to create a new command button using the CUI for converting the plot styles to STB from CTB.

 

I have already made the STB file and I have this macros line ^C^C_C^C_ CONVERTPSTYLES; Myfile.stb

 

There are two problems;

1. When I press the custom button the CUI dialoge opens

2. The macro does not work for reason I hope will be obvious to the smart people here. 

 

Many thanks to anyone who can help! 

*Expert Elite*
pendean
Posts: 21,633
Registered: ‎11-06-2003
Message 2 of 6 (355 Views)

Re: Macro/Custom Button for CONVERTPSTYLES

11-09-2012 05:29 AM in reply to: DRLTKSE

CONVERTPSTYLES is not a "pick my STB and use it" type of command, it's more of a toggle that can switch a dwg file CTB>STB or the reverse STB>CTB.

And if a file is CTB you may need to use CONVERTCTB first.

 

Basically, you method of converting a DWG file ignores way too many other parameters that may be at play here. So explain what it is you are trying to achieve, are you switching to STB permanently with all your DWG files or are you trying to "fix" files you get from others?

Dean Saadallah Blog | Facebook | Google+ | Twitter | PINS
Member
DRLTKSE
Posts: 5
Registered: ‎11-07-2012
Message 3 of 6 (346 Views)

Re: Macro/Custom Button for CONVERTPSTYLES

11-09-2012 06:29 AM in reply to: pendean

Thanks for your reply. 

 

I don't want to convert all my DWG files, just certain ones generated from Inventor.

 

I have already used CONVERTCTB to create and STB file that I can then use for all the other drawings a need to convert.

*Expert Elite*
pendean
Posts: 21,633
Registered: ‎11-06-2003
Message 4 of 6 (336 Views)

Re: Macro/Custom Button for CONVERTPSTYLES

11-09-2012 08:16 AM in reply to: DRLTKSE

Since it's a very specific need that has very few variables, you can automate it but you must use Lisp to call the command in order to get the commandline version:

 

 (command "ConvertPStyles")

 

Try it by typing the above at the commandline and following through with the prompts, see if it does what you want in your Inventor converted files.

Dean Saadallah Blog | Facebook | Google+ | Twitter | PINS
Active Member
bouwenb
Posts: 9
Registered: ‎06-07-2010
Message 5 of 6 (262 Views)

Re: Macro/Custom Button for CONVERTPSTYLES

01-28-2013 11:44 PM in reply to: pendean

Hi all,

 

when I use the Lisp call, I can only specify .stb files that are located in the plot file table search path (in my case this is "C:\Users\xxxxx\appdata\roaming\autodesk\autocad 2012 - english\r18.2\enu\plotters\plot styles").

I can not specify an .stb file that is located in another folder, or even in a subfolder of the search path.

 

Is there a way of specifying the full path of the .stb file in the Lisp call?

 

I've tried the following, but without succes:

(command "ConvertPstyles" "c:/Users/...../plot styles/STB files/Conv2STB.stb")

 

Thanks

*Expert Elite*
pendean
Posts: 21,633
Registered: ‎11-06-2003
Message 6 of 6 (249 Views)

Re: Macro/Custom Button for CONVERTPSTYLES

01-29-2013 05:58 AM in reply to: bouwenb

Try a forum more focused about your need like the Lisp Customization Discussion area:
http://forums.autodesk.com/t5/Visual-LISP-AutoLISP-and-General/bd-p/130

Dean Saadallah Blog | Facebook | Google+ | Twitter | PINS

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community




Connect with AutoCAD

Twitter

Facebook

Blogs

Pinterest

Youtube