Help with making more frames than one

Help with making more frames than one

kamal_kouidar
Contributor Contributor
347 Views
3 Replies
Message 1 of 4

Help with making more frames than one

kamal_kouidar
Contributor
Contributor

Hi!

 

With my code I can make only one frame with the lines, blocks etc (Image 1). But when I have more groups it goes through the frame (Image 2).

I want to be able to customize my script so that it is dynamic. More than 26 groups means that the 27th group starts on a new frame, so even if you have 60 groups, for example, it must be divided with a maximum of 26 groups per frame (Image 3).

 

I hope there is someone who has a way to do this easily, I prefer to make few changes to my code.

 

See below the images:

 

 

Image 1:

 

This code 1 frame.png

 

Image 2:

 

inserts exceeds frame .png

 

Image 3:

 

TMore than 1 frame.png

 

This shows how I want to have it, see Image 4 if I have 78 groups :).

 

more frames .pngThis is what i want

 

0 Likes
348 Views
3 Replies
Replies (3)
Message 2 of 4

ec-cad
Collaborator
Collaborator

Your code has many particular points set for various block inserts. That's OK, but it makes it harder to

place new items at entirely different X Y locations.

You might want to blend in the following code snippet to adjust (all) the X values of the points for

2nd and 3rd set of images. Good luck.

;; Add Distance to X point

 (defun AddDistX ( ptxy dx )
  (if ptxy
   (progn
    (setq Xval (car ptxy) Yval (cdr ptxy))
    (setq Xval (+ Xval dx))
    (setq newpt (list Xval Yval 0.0))
   newpt ;returns new point
   ); progn
  ); if

Call to above:
; Original code for setting your x y point
 (setq pt (vlax-3d-point x y 0))
; once that is set, if it's the 'next group reset all the Points X value
; set the X offset desired
 (setq xdist 100.0)
 (setq pt (AddDistX pt xdist)); to reset original pt + xdist
0 Likes
Message 3 of 4

devitg
Advisor
Advisor

@kamal_kouidar  Please upload SYMBOLEN 2.dwg and StealV1-8.lsp 

0 Likes
Message 4 of 4

Sea-Haven
Mentor
Mentor

Because your making a rectang around the area of interest you can auto make Layouts of each area using the rectangs, let me know if useful.

 

Waiting for dwg.

 

 

0 Likes