CAD Forum - Database of tips, tricks and utilities for AutoCAD, Inventor and other Autodesk products [www.cadforum.cz]
CZ | EN | DE
Login or
registration
  Visitors: 19004
RSS channel - CAD tips RSS tips
RSS discussions

Discussion Discussion forum

 

HelpCAD discussion

 
CAD Forum - Homepage CAD discussion forum - ask any CAD-related questions here, share your CAD knowledge on AutoCAD, Inventor, Revit and other Autodesk software with your peers from all over the world. To start a new topic, choose an appropriate forum.

Please abide by the rules of this forum.

How to post questions: register or login, go to the specific forum and click the NEW TOPIC button.
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Topic ClosedUsing A Script To Update Block In Multiple Files

 Post Reply Post Reply
Author
rebellio View Drop Down
Senior Member
Senior Member


Joined: 04.Mar.2009
Location: Netherlands
Using: Autocad 2018
Status: Offline
Points: 125
Direct Link To This Post Topic: Using A Script To Update Block In Multiple Files
    Posted: 21.Aug.2019 at 15:50
Other thing is that the block wont redefine because that script is inserting a block that is already in the drawing....... 
Back to Top
rebellio View Drop Down
Senior Member
Senior Member


Joined: 04.Mar.2009
Location: Netherlands
Using: Autocad 2018
Status: Offline
Points: 125
Direct Link To This Post Posted: 21.Aug.2019 at 11:13
You were right it did not work, my mistake....
Try this and be sure you have that last enter after the _qsave command

-INSERT
title=
(COMMAND \E "RESUME")
_QSAVE
this enter
Back to Top
NTGS View Drop Down
Newbie
Newbie


Joined: 20.Aug.2019
Location: United Kingdom
Using: AutoCAD
Status: Offline
Points: 4
Direct Link To This Post Posted: 21.Aug.2019 at 11:05
I think I know the issue, the script works for me when I have a block with no spaces in its title. But when I have a block that has a space it doesn't work. When I run the script to update a block called Construction Stamp it assumes the block is called Construction.dwg.
 
Do you know how to represent spaces in the script file for the block title?
Back to Top
rebellio View Drop Down
Senior Member
Senior Member


Joined: 04.Mar.2009
Location: Netherlands
Using: Autocad 2018
Status: Offline
Points: 125
Direct Link To This Post Posted: 21.Aug.2019 at 10:39
Im using acad 2018
Back to Top
NTGS View Drop Down
Newbie
Newbie


Joined: 20.Aug.2019
Location: United Kingdom
Using: AutoCAD
Status: Offline
Points: 4
Direct Link To This Post Posted: 21.Aug.2019 at 10:06
Yeah I defined the path location.
 
What version of AutoCAD are you using?
Back to Top
rebellio View Drop Down
Senior Member
Senior Member


Joined: 04.Mar.2009
Location: Netherlands
Using: Autocad 2018
Status: Offline
Points: 125
Direct Link To This Post Posted: 21.Aug.2019 at 08:01
Seems to work fine by me.
Did you defined the path location for that block via options-->files--->Support File Search Path?
Back to Top
NTGS View Drop Down
Newbie
Newbie


Joined: 20.Aug.2019
Location: United Kingdom
Using: AutoCAD
Status: Offline
Points: 4
Direct Link To This Post Posted: 20.Aug.2019 at 18:24

Hello,

I am trying to write a script that updates an existing block in a drawing. I then plan on using ScriptPro to run the script across multiple drawings that have the block inside.
 

-INSERT

title=

(COMMAND \E "RESUME")

QSAVE

"title" is the block name .

I run the script through ScriptPro and it doesn't update the block

I get this message in the log file:

"title" = Warning: If you are trying to insert the file: "title" it must be inserted using the <block> = <filename> syntax. Command: y Unknown command "Y". Press F1 for help. Command: _. quit Command: **** No System Variable Changed ****

Could anyone knowledgeable about scripts let me know what I am doing wrong or suggest a better method?

Thanks

Back to Top

Related CAD tips:


 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down



This page was generated in 0,355 seconds.