• This forum is the machine-generated translation of www.cad3d.it/forum1 - the Italian design community. Several terms are not translated correctly.

insertion images flanked

  • Thread starter Thread starter Papao
  • Start date Start date

Papao

Guest
Good morning to all,
I have a lisp that allows me to insert in the drawing area, all the pictures contained in a certain folder.
the insertion point is via the mouse click (on the drawing area) for each image.

However, given an initial point of insertion on the screen, insert the images stacked at two to two (starting from the bottom left corner, as example below:□□
□□
□□
place below code:
Code:
(foreach item (vl-directory-files loc "*.jpg" 1)
(command "._image" "_a"
(strcat loc "" item)
pause             
(* scala 50.0)
0.0
)
(command "_imageframe" 2)
)
I tried to assign the screen point to a variable, then increase it for inserting the next images... but I mistake something and therefore it does not work:
Code:
(setq pt1 (getpoint "\n indicate insertion point:"))
Do you have any suggestions?
 
allego image stacking example, starting from the bottom left corner (image 1)
Sorry, but I couldn't find a way to post it...
Sequenza immagini.webp
 
I'm guessing... will everyone be on vacation?

cmq if you can help, qui There is a thread that talks about the same topic...and it seems to have been resolved. . .
 
rightly... .. they detached the grip to take the deserved rest.

Meanwhile, thank you redone of the interest, if you can correct the link you posted, it doesn't work to me.
 
true, the link does not work and I reinsercate qui, I posted with my mobile phone but sometimes I have some display/entry issues with this site....
 
reddish, I think I already know this post di
mine was a request after that, an evolution. . .

you did well to post it, because I noticed that the final code is missing: I post it, could serve other friends of the forum.
 
assuming that variables loc (percorso) e scale Esistano:
Code:
 (Section 60)
(setq diri 80) ;distance between rows

(setq pt1 (getpoint "\n indicate insertion point:"))
(setq im (vl-directory-files loc "*.jpg" 1))
(setq primal 1)
(setq pt_ins pt)
(sing)
(command "_.-attach" (strcat loc (car im)) pt_ins (* scale 50.0) "0.0" )
(seq primacol (- 1 primacol))
(if (zerop primacol)
(setq pt_ins (polar pt_ins 0.0 say)
(progn)
(setq pt1 (polar pt1 (/ pi2))
(setq pt_ins pt)
)
)
(setq im)
)
(princ)
 
Last edited by a moderator:
hi gp I added/replaced your code within mine and it's fine.
I'd like to learn, too.
Thank you
 

Forum statistics

Threads
44,997
Messages
339,767
Members
4
Latest member
ibt

Members online

No members online now.
Back
Top