Author Topic: Change Multiple dwgs with a scripts or something  (Read 7732 times)

0 Members and 1 Guest are viewing this topic.

M-dub

  • Guest
Re: Change Multiple dwgs with a scripts or something
« Reply #15 on: July 24, 2006, 11:03:59 AM »
Here's what I would use for your script...

Code: [Select]
-style;l75;arial.ttf;;;;;;cht;ALL;;T;G;CONCRETE;CONC;T;G;PAVEMENT;PVMT;;

That will take care of the first three items, but the block you want to insert, is it going in at the same coordinates on every drawing?
Plotting can also be done via a script, but it would be easier to use the Batch Plot utility.

Bob Wahr

  • Guest
Re: Change Multiple dwgs with a scripts or something
« Reply #16 on: July 24, 2006, 11:24:53 AM »
Same advice I have on any script.  Type it into the command line.  All a script is, is an automated set of comands.  If you can type it in, you can script it.  If you type it in and a dialog box pops up, try typing it again with a - before the command.  The below makes use of an autodesk lisp called chtext
Code: [Select]
-STYLE
l75
ARIAL.TTF





chtxt
all

s

l75
t
g
CONCRETE
CONC.
t
g
PAVEMENT
PVMT.

_pasteclip
0,0
-plot
Y

<certain printer name>
<paper size>
<units>
<orientation>
n
e
<plot scale>
c
y
<pen settings>






MSTG007

  • Gator
  • Posts: 2601
  • I can't remeber what I already asked! I need help!
Re: Change Multiple dwgs with a scripts or something
« Reply #17 on: July 24, 2006, 11:35:42 AM »
i am getting a error

Command: -STYLE
Enter name of text style or [?] <L70>: l75

New style.
Specify full font name or font filename (TTF or SHX) <txt>: ARIAL.TTF
Specify height of text <0.00>:
Specify width factor <1.00>:

Specify obliquing angle <0d0'0">:
Display text backwards? [Yes/No] <N>:
Display text upside-down? [Yes/No] <N>:

"l75" is now the current text style.

Command: chtxt
Unknown command "CHTXT".  Press F1 for help.
Civil3D 2020

M-dub

  • Guest
Re: Change Multiple dwgs with a scripts or something
« Reply #18 on: July 24, 2006, 11:43:47 AM »
Try CHT in place of CHTXT

MSTG007

  • Gator
  • Posts: 2601
  • I can't remeber what I already asked! I need help!
Re: Change Multiple dwgs with a scripts or something
« Reply #19 on: July 24, 2006, 05:50:39 PM »
ok... I guess this would be a smart time to tell you i still can not get the script to work. I am running CIVIL3D2006. Here is the following error i get:

\DesktopProfile\detail.scr"

Command: -STYLE
Enter name of text style or [?] <L70>: l75

New style.
Specify full font name or font filename (TTF or SHX) <txt>: ARIAL.TTF
Specify height of text <0.00>:
Specify width factor <1.00>:

Specify obliquing angle <0d0'0">:
Display text backwards? [Yes/No] <N>:
Display text upside-down? [Yes/No] <N>:

"l75" is now the current text style.

Command:
-STYLE Enter name of text style or [?] <l75>: ARIAL.TTF

New style.
Specify full font name or font filename (TTF or SHX) <txt>: s

Font not available.
Command:
-STYLE Enter name of text style or [?] <l75>: l175

Existing style.
Specify full font name or font filename (TTF or SHX) <simplex>: find

Font not available.
Command: CONCRETE
Unknown command "CONCRETE".  Press F1 for help.

thxs
Civil3D 2020

CADaver

  • Guest
Re: Change Multiple dwgs with a scripts or something
« Reply #20 on: July 24, 2006, 05:56:46 PM »
Looks like one too many "enter" lines after the style definition.  Instead of using blank lines for entering defaults, I go ahead and add the default values in the script files just to make sure I'm running with the right syntax.

M-dub

  • Guest
Re: Change Multiple dwgs with a scripts or something
« Reply #21 on: July 24, 2006, 06:01:03 PM »
Well, we can see where the script turned south by knowing what we wanted it to do and comparing it to what the script did.
Here, we see that it went through and changed the font file in L75 to Arial, but it looks like there's one too many "Return"s in there, as it starts the -Style command again.

Try this
Code: [Select]
-STYLE
l75
ARIAL.TTF



cht
all
t
g
CONCRETE
CONC.
t
g
PAVEMENT
PVMT.

_pasteclip
0,0
-plot
Y

<certain printer name>
<paper size>
<units>
<orientation>
n
e
<plot scale>
c
y
<pen settings>

Bob Wahr

  • Guest
Re: Change Multiple dwgs with a scripts or something
« Reply #22 on: July 24, 2006, 06:03:29 PM »
it would help if you put the contents of your script instead of the command dump.  You are setting the style, seems to work fine, then you go through the style command again but not correctly, then partially again, trying to launch a find command (more on this in a sec) as the font file.  Then try to change CONCRETE using FIND which you didn't launch above in a way that AFAIK you can't.  FIND is not a command line usable command.

Again, type the commands in, one at a time, manually in a drawing.  What you have to type to get it to work is EXACTLY what you need in the script.  Why did you decide not to use chtext.lsp?



<edit>outsped by m-daddy(almost)</edit>

CADaver

  • Guest
Re: Change Multiple dwgs with a scripts or something
« Reply #23 on: July 24, 2006, 06:19:30 PM »
..., then you go through the style command again but not correctly, then partially again, trying to launch a find command (more on this in a sec) as the font file.  ...
I'm guessing there's too many "enter" lines and he's trying to repeat the last command a couple of times, maybe not.

MSTG007

  • Gator
  • Posts: 2601
  • I can't remeber what I already asked! I need help!
Re: Change Multiple dwgs with a scripts or something
« Reply #24 on: July 24, 2006, 06:41:46 PM »
cad has no clue what "CHT" is.


-STYLE
l75
ARIAL.TTF





cht
all
t
g
CONCRETE
CONC.
t
g
PAVEMENT
PVMT.

_pasteclip
0,0
-plot
Y

<certain printer name>
<paper size>
<units>
<orientation>
n
e
<plot scale>
c
y
<pen settings>
Civil3D 2020

M-dub

  • Guest
Re: Change Multiple dwgs with a scripts or something
« Reply #25 on: July 24, 2006, 06:47:08 PM »
Again, type the commands in, one at a time, manually in a drawing.  What you have to type to get it to work is EXACTLY what you need in the script.  Why did you decide not to use chtext.lsp?

I concur.
Go into one of the drawings you want to change and make sure you can do EVERYTHING you're trying to do at the command prompt.
The above should work.  _pasteclip is where it's going to get sketchy and <certain printer name is going to throw a wrench in the gears and bring you to a screeching halt.  Let's get you to that point first.
Again, is the block you want to insert A) The same block for each drawing and B) going to be inserted in the same location for each drawing?

Bob Wahr

  • Guest
Re: Change Multiple dwgs with a scripts or something
« Reply #26 on: July 24, 2006, 06:50:29 PM »
agree that pasteclip is sketchy but that's what was asked for.  I'm assuming that said block is a title block and would need to be copied befroe the script is run.  You would be a lot better off using INSERT than pasteclip IMO but you can do it either way if you make sure that you are doing it correctly.

MSTG007

  • Gator
  • Posts: 2601
  • I can't remeber what I already asked! I need help!
Re: Change Multiple dwgs with a scripts or something
« Reply #27 on: July 24, 2006, 06:55:18 PM »
-STYLE   <<<<<<<<<<<<WORKS
l75
ARIAL.TTF



cht (NO CLUE WHAT CHT IS)<<<<<<<<<<<<----------------- DOES NOT WORK
all
t
g
CONCRETE
CONC.
t
g
PAVEMENT
PVMT. <<<<<<<<<<<<----------------- DOES NOT WORK

SPELL <<<<<<<WORKS
ALL

_pasteclip 0,0 <<<<<<<<<<<<-------- DOES NOT WORK

-plot <<<<<<<<WORKS
yes

IR2270.pc3

Inches
PORTRAIT
no
extents
FIT
Center
yes
OCE DEBOY.CTB
yes
no
no
no
yes
         <<<<<<WORKS
Civil3D 2020

Bob Wahr

  • Guest
Re: Change Multiple dwgs with a scripts or something
« Reply #28 on: July 24, 2006, 07:00:56 PM »
cht, look on your computer for a lisp routine called chtext.lsp make sure it's loaded.

_pasteclip should work IF you copyclip the block that you want to paste before running the script, i didn't test it though, you're better off doing

-insert
<blockname>
0,0
1

0

MSTG007

  • Gator
  • Posts: 2601
  • I can't remeber what I already asked! I need help!
Re: Change Multiple dwgs with a scripts or something
« Reply #29 on: July 24, 2006, 07:11:51 PM »
CHTXT IS WORKING.

t (per cmd line thinks its mtext
g (group)


I was trying to bring in a external block at 0,0

here is where i am at

-STYLE
L175
ARIAL.TTF
.2




chtXT

t
g
CONCRETE
CONC.
t
g
PAVEMENT
PVMT.



SPELL
ALL

_INSERT
E:\CAD\WATERMARK.DWG
0,0

-plot
yes

IR2270.pc3

Inches
PORTRAIT
no
extents
FIT
Center
yes
OCE DEBOY.CTB
yes
no
no
no
yes
Civil3D 2020