Visual LISP, AutoLISP and General Customization

Reply
Active Member
Posts: 6
Registered: ‎10-03-2012
Message 1 of 7 (553 Views)

attach xref lisp

553 Views, 6 Replies
01-11-2013 05:37 AM

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?

 

*Expert Elite*
Posts: 2,370
Registered: ‎11-24-2009
Message 2 of 7 (535 Views)

Re: attach xref lisp

01-11-2013 08:08 AM in reply to: Raksos87

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 :smileyhappy:

 

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

 

 

 

 

 

 

*Expert Elite*
3wood
Posts: 909
Registered: ‎03-25-2009
Message 3 of 7 (522 Views)

Re: attach xref lisp

01-11-2013 01:12 PM in reply to: Raksos87

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

*Expert Elite*
Posts: 2,370
Registered: ‎11-24-2009
Message 4 of 7 (505 Views)

Re: attach xref lisp

01-12-2013 07:56 AM 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? :smileyhappy: 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 :smileyhappy:

 

*Expert Elite*
3wood
Posts: 909
Registered: ‎03-25-2009
Message 5 of 7 (492 Views)

Re: attach xref lisp

01-12-2013 12:52 PM in reply to: pbejse

How about EXPORTLAYOUT?

*Expert Elite*
Posts: 2,370
Registered: ‎11-24-2009
Message 6 of 7 (486 Views)

Re: attach xref lisp

01-12-2013 08:28 PM 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

 

Active Member
Posts: 6
Registered: ‎10-03-2012
Message 7 of 7 (461 Views)

Re: attach xref lisp

01-13-2013 10:35 PM in reply to: Raksos87

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?

 

 

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you interested in helping shape the Autodesk Community?
We’re looking at a few different ways to improve the “All Forums” landing page and need your feedback! If interested, please take a few minutes to fill out the following Usability Study. Thank you for your time!

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community