Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

attach xref lisp

6 REPLIES 6
Reply
Message 1 of 7
Oskar.stahl
1159 Views, 6 Replies

attach xref lisp

Hello, I need some help.

 

We have hundreds of drawings where the layouts is in diffrent files then the model, example:

model_E6XX.X

layout_E6XX.X

 

Is it possible to create a lisp file that i can run that gets the name of the layout file removes "layout" attaches "model" then loads that file so i can run in on multiple files at once?

 

6 REPLIES 6
Message 2 of 7
pbejse
in reply to: Oskar.stahl


@Raksos87 wrote:

Hello, I need some help.

  

Is it possible to create a lisp file that i can run that gets the name of the layout file removes "layout" attaches "model" then loads that file so i can run in on multiple files at once?

 


I think its doable, it requires complex coding  to make if foolproof though. but then again. maybe not 🙂

 

EDIT: The drawing entities are on Layout tabs and you want them transfered to model? does that sound about right? Makes me wonder why there are entities other than the titleblock on paperspace... 

 

Post a sample file Raksos87

 

 

 

 

 

 

Message 3 of 7
3wood
in reply to: Oskar.stahl

It won't be too hard if there is only one viewport in each layout file.

One method is

1. Open the layout file

2. Use CHSPACE to move all entities in layout to model space, and

3. Bind the xref in model space

Message 4 of 7
pbejse
in reply to: 3wood


@3wood wrote:

It won't be too hard if there is only one viewport in each layout file.

One method is

1. Open the layout file

2. Use CHSPACE to move all entities in layout to model space, and

3. Bind the xref in model space


That would have been too easy eh 3wood? 🙂 I'm wondering how may layouts does the OP have or viewports per layoyut. problem i see with chspace is, if two or more  viewports is showing the same objects in model space but only of different scale, then objects transfered from layout will be on top of the one another, objects like annotations ,title blocks and what not.  I guess it will all depend on how the OP's drawing is setup.

 

Anyhow, happy weekend 🙂

 

Message 5 of 7
3wood
in reply to: pbejse

How about EXPORTLAYOUT?

Message 6 of 7
pbejse
in reply to: 3wood


@3wood wrote:

How about EXPORTLAYOUT?


You may have something there 3wood. That may be what the OP had to use to accomplish his task.

 

Cheers

 

Message 7 of 7
Oskar.stahl
in reply to: Oskar.stahl

Sorry, I will try to explain myself better. I work with electrical drawings in buildings. The name of my model drawings is model_E6XX.X. For plotting i store all of my layouts in a seperate drawing called layout_E6XX.X. What i want to do is run a script on the drawing "layout_E6XX.X" that attaches the modelfile, where i dont have to change name and stuff.

 

Does that make more sense?

 

 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost