Jump to content

Recommended Posts

Posted

Hi All,

I have so many sheet files created using SSM. The title block file which was XRefed in these sheets has a wrong file name. I am going to rename the file, which, I suppose, will screw up all my sheets. A solution I found was;

 

  1. Rename the Title Block File
  2. Since File Name is changing I think Reference Manager doesn't help. So I have created a script file to detach the existing XRef (with wrong name) and Attach the new one (the renamed file)
  3. Run the script on all the files using ScriptPro

 

Now, the problem is that, before running the script pro, I have to make sure the Title Block is getting attached in the Layout Space and not in the model space. So for that, I have to activate the Layout tab first in my script file. Each sheet has only one layout. So I wrote the script like this;

 

;;SCRIPT STARTS HERE

FILEDIA 0

LAYOUT

SET

 

-XREF

DETACH

-XREF

ATTACH

0,0

1

1

0

FILEDIA 1

;;SCRIPT ENDS HERE

 

I hope the Blank line after 'SET' would set the only existing layout current.

 

Now I hope I explained the whole scenario.

Is it there a way faster and safer?

Posted

You could try setting TILEMODE to 0.

 

TILEMODE = 0 - Paper space layout

TILEMODE = 1 - Model space

Posted

You could also just use the Rename command, and then repath the xref (search here, there's a few ways of doing this - even through the -XREF Path command). No need to change MS/PS/Tab.

 

Otherwise: If your DWG's have more than one tab you can get hold of a list of tab names using (layoutlist) and then do a foreach to step through all, set the current tab using the CTAB sysvar. But this way you'll need to call all the commands through lisp's command function - seeing as they have to be performed for each iteration inside the foreach loop.

Posted

irneb and CAD64,

Thanks for th reply... It really gave a clear idea.

However, I managed to do it with the method I posted in my previous thread. That worked.

But your advices put more light on the same...

Thanks a lot...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...