Author Topic: About slides; making them "automatically"  (Read 2511 times)

0 Members and 1 Guest are viewing this topic.

Aerdvark

  • Guest
About slides; making them "automatically"
« on: March 18, 2011, 07:36:03 AM »
Hi there,

For some purposes I keep using slides. I know how to create them, even a map with *.dwg's (blocks) can be processed at once with slidelib. All okay...

However, I was wondering if there is a way to select a block (one of many) in the current drawing and make a slide of it. All by lisp without using the  command "MSLIDE". It sounds easy but it is not since the -mslide version does not work in lisp I figure maybe filedia "0" would com in handy. hen again, a slide is made of the entire DWG as far as I know. So I guess the block needs to be opened in a new dwg first. But in such case the attributes get visible.

I think I am approaching it way too difficult and hope someone can point me in the right direction. If I may wish for how it should work:
Code: [Select]
command: makeslide <enter>
Select block in drawing:
Slide created ("C:\Slides\Test.sld")
command:
Only thing important is the slidename: it should match the block's name.

Thanks in advance!

efernal

  • Bull Frog
  • Posts: 206
Re: About slides; making them "automatically"
« Reply #1 on: March 18, 2011, 08:26:49 AM »
I always use something like this...
Code: [Select]
(DEFUN c:makeslides (/ lista)
  (SETQ lista (VL-DIRECTORY-FILES "C:\\My_Files\\" "*dwg" 1))
  (FOREACH x lista
    (COMMAND "_.ERASE"
             "_ALL"
             ""
             "_-INSERT"
             (STRCAT "C:\\My_Files\\" x)
             '(0 0 0)
             1.0
             1.0
             0.0
             "_.ZOOM"
             "_EXTENTS"
             "_.ZOOM"
             "0.9X"
             "_REGEN"
             "_.MSLIDE"
             (STRCAT "C:\\My_Files\\Sld\\" (SUBSTR x 1 (- (STRLEN x) 3)) "sld")
             "_.ERASE"
             "LAST"
             ""
             "_.PURGE"
             "_BLOCK"
             (SUBSTR x 1 (- (STRLEN x) 4))
             "N"
    )
  )
  (PRINC)
)

e.fernal

BIGAL

  • Swamp Rat
  • Posts: 1411
  • 40 + years of using Autocad
Re: About slides; making them "automatically"
« Reply #2 on: March 20, 2011, 10:03:51 PM »
Mslide should work in lisp ? Anyway just make a "list" of your blocks then insert 1 block at say 0,0 then zoom E then zoom 0.9 you need to be just a bit inside to make a good slide then mslide with block name, Erase last and do next block.

If you want multi dwgs then write a script
open dwg1 myslidemaker close N
open dwg2 myslidemaker close N

(setq ss (ssget "_X" '(0 . "INSERT" ))) ; makes a list of all your blocks
(setq n (sslength ss2))   ; n number of blocks and so on
A man who never made a mistake never made anything

Aerdvark

  • Guest
Re: About slides; making them "automatically"
« Reply #3 on: March 21, 2011, 02:46:28 AM »
Thanks guys for the help but it is not how I meant it.

When working in a drawing, and using many different blocks, I want to be able to select a block and make a slide of it "with the ease of one left mouse click".
If necessary I will click a little harder  :-)
The slides are then used in another situation.

I hate the idea of copying and pasting the block into a new dwg and make a slide manually.
Unless it is the only solution...

Maybe I come across a solution, then I will post it.

efernal

  • Bull Frog
  • Posts: 206
Re: About slides; making them "automatically"
« Reply #4 on: March 21, 2011, 07:58:49 AM »
Mslide should work in lisp ? Anyway just make a "list" of your blocks then insert 1 block at say 0,0 then zoom E then zoom 0.9 you need to be just a bit inside to make a good slide then mslide with block name, Erase last and do next block.

If you want multi dwgs then write a script
open dwg1 myslidemaker close N
open dwg2 myslidemaker close N

(setq ss (ssget "_X" '(0 . "INSERT" ))) ; makes a list of all your blocks
(setq n (sslength ss2))   ; n number of blocks and so on

e.fernal

efernal

  • Bull Frog
  • Posts: 206
Re: About slides; making them "automatically"
« Reply #5 on: March 21, 2011, 08:01:15 AM »
I do not need to write scripts...
Just change the paths...
e.fernal

Pepe

  • Newt
  • Posts: 87
Re: About slides; making them "automatically"
« Reply #6 on: March 21, 2011, 01:58:36 PM »
Hi..

żIs there any software to write slides directly from entities  :roll: ? If not, maybe it's a bit tricky but it could be something like (in 'Pseudo code')...:

- Keep somewhere the actual view
- Get 'Max or 'Min extension point
- Insert the block in a point far away the rectangle (window) defined by those points
- GetBoundingbox of the inserted block, and fit the view to it
- Make the Slide
- Erase the block
- Turn to the original view

 :lol: Bye!

BIGAL

  • Swamp Rat
  • Posts: 1411
  • 40 + years of using Autocad
Re: About slides; making them "automatically"
« Reply #7 on: June 26, 2011, 04:13:17 AM »
You could pick a block and make a slide with block name etc I am sure there is some code around that will give size of block rectang around it, then you would zoom that window zoom 0.8 mslide done.
A man who never made a mistake never made anything

jbuzbee

  • Swamp Rat
  • Posts: 851
Re: About slides; making them "automatically"
« Reply #8 on: June 27, 2011, 09:30:37 AM »
ahem.

OpenDCL has a blockview control.  no slides to make or manage and if the block changes it immediately shows in the control.

www.opendcl.com

carry on.
James Buzbee
Windows 8