CAD Forum - Database of tips, tricks and utilities for AutoCAD, Inventor and other Autodesk products [www.cadforum.cz]
Czech English Deutsch
Login/Register:
 Visitors: 1784 
RSS tips RSS channel - CAD tips
RSS discussion RSS channel - CAD discussion

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

The information that you provide in this form will make up your forum profile which can be viewed by other forum members. Your email address will only be visible by forum admin and moderators and will be used to send you Forum Notifications. To cancel your account, use the page Opt-out or contact webmaster@cadforum.cz.

Using 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: 117
Post Options Post Options   Thanks (0) Thanks(0)   Quote rebellio Quote  Post ReplyReply 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: 117
Post Options Post Options   Thanks (0) Thanks(0)   Quote rebellio Quote  Post ReplyReply 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
Post Options Post Options   Thanks (0) Thanks(0)   Quote NTGS Quote  Post ReplyReply 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: 117
Post Options Post Options   Thanks (0) Thanks(0)   Quote rebellio Quote  Post ReplyReply 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
Post Options Post Options   Thanks (0) Thanks(0)   Quote NTGS Quote  Post ReplyReply 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: 117
Post Options Post Options   Thanks (0) Thanks(0)   Quote rebellio Quote  Post ReplyReply 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
Post Options Post Options   Thanks (0) Thanks(0)   Quote NTGS Quote  Post ReplyReply 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,078 seconds.