CafeJr Posted June 24, 2015 Posted June 24, 2015 Hi to all, I need a basic instructions to try to learn with DCL files!... 1 - How I can show a preview of a image in a chosen item in one toggle button, I have 3 toggles to select, when one of them is chosen it will show a preview of the image (the image is a block inside of dwg file); 2 - Chose, how I can start a Dialog with one item selected (the variable [value = "1"], only fill a image as selected item, but don't select it. Thanks in advance to any help. Quote
harleyfr3ak Posted June 24, 2015 Posted June 24, 2015 I would like to write a lisp that will allow my enter key to work the accept button. Quote
CafeJr Posted June 24, 2015 Author Posted June 24, 2015 I would like to write a lisp that will allow my enter key to work the accept button. Please, see one question in your Thread!... http://www.cadtutor.net/forum/showthread.php?92892-Lisp&p=635677&viewfull=1#post635677 Quote
CafeJr Posted June 25, 2015 Author Posted June 25, 2015 (edited) Something like THIS ? Yes, Tharwat, thanks!... It helps!!!... I'm trying to apply it on my lisp code, the problem to me it's that I have only one img field and 18 items to be chosen in a toggle button... Do you know!... It's a big challenge to a beginner!!!... Ha ha ha... And about the item 2?... How to validate the first item when the code is started? Do you know it? Edited June 25, 2015 by CafeJr Quote
Tharwat Posted June 25, 2015 Posted June 25, 2015 And about the item 2?... How to validate the first item when the code is started? Do you know it? Your question seems as a challenge although it is not. Read about the function set_tile function. Quote
CafeJr Posted June 25, 2015 Author Posted June 25, 2015 Your question seems as a challenge although it is not. Read about the function set_tile function. Isn't a challenge to anyone that knows what he need to do!... He he he... (I don't know!... He he he...) I tried it after a action_tile, but nothing!... (action_tile "rb1" "(setq tipo \"C\")(mode_tile \"tog1\" 1)(mode_tile \"tog2\" 1)(set_tile \"img\" \"C:\\Lisp\\Desenvolvimento\\Slides\\slide-C.sld\")" ) Quote
Lee Mac Posted June 25, 2015 Posted June 25, 2015 This example may help you towards your goal (requires Swamp membership to view). Quote
Tharwat Posted June 25, 2015 Posted June 25, 2015 Add this function to your program at the top anywhere and just before the line that you use the this function . (defun ShowImage (key sldName ) (start_image key) (fill_image 0 0 (dimx_tile key) (dimy_tile key) 0) (slide_image 0 0 (dimx_tile key) (dimy_tile key) sldName) (end_image) ) Then call it like this . (ShowImage \"img\" \"C:\\Lisp\\Desenvolvimento\\Slides\\slide-C.sld\") Quote
CafeJr Posted June 25, 2015 Author Posted June 25, 2015 (edited) (defun ShowImage (key sldName ) (start_image key) (fill_image 0 0 (dimx_tile key) (dimy_tile key) 0) (slide_image 0 0 (dimx_tile key) (dimy_tile key) sldName) (end_image) ) Tharwat, thanks again, it works in part... the initial image that code shows was erased when the action_tile is executed... only it happens... DCL :image {width=20;aspect_ratio=0.8;color=0;fixed_height=true;key = img;} LISP [color="blue"](start_image "img") (slide_image 1 1 100 60 "C:\\Lisp\\Desenvolvimento\\Slides\\slide-C.sld") (end_image)[/color] It show exactly that I need... to combine your code is not necessary to change "key" to "img"? I tried but still not working!... Edited June 25, 2015 by CafeJr Quote
CafeJr Posted June 25, 2015 Author Posted June 25, 2015 This example may help you towards your goal (requires Swamp membership to view). Thanks Lee Mac!... It's a very nice code!!!... I'll try to learn something there!!!... Quote
Tharwat Posted June 25, 2015 Posted June 25, 2015 I don't know what you have in your program and how you managed your codes , so I can say nothing other than the standard behavior of codes that I posted earlier . Quote
CafeJr Posted June 25, 2015 Author Posted June 25, 2015 I don't know what you have in your program and how you managed your codes , so I can say nothing other than the standard behavior of codes that I posted earlier . Don't worry and I'm grateful for your help!... I'll try more one shots!... He he he... Quote
CafeJr Posted June 25, 2015 Author Posted June 25, 2015 (edited) Tharwat, Please, I don't know if I'm correctly... I use mslide to create a Slide file (.sld), but I have no dimensions of that picture, It could be my mistake at my code!... Your code get these dimensions, correct? To see the picture I use vslide, but it only show the pictures, not the picture features. On my DCL file I wrote Width = 20; to show the first image I use width = 100; height = 60. How I can get the slide picture dimensions?... Edited July 1, 2015 by CafeJr Quote
Tharwat Posted June 26, 2015 Posted June 26, 2015 Hi, If you have more than one slide image to use in your program , it is recommended to use the same scale of the model space when taking theses slides and this would help you to have the same image attribute's codes and avoid the different scales of slides . For me I am almost not using slides anymore but anyway try to make a viewport with static scale then activate that viewport by double click in it to open then take your desired slide and this would help you to have the same scale for your slides. I don't think that the slide picture dimensions is accessible so if you implement what I have described earlier , you would be in no need of that and what's more you would have a static view size for all your slides . Good luck. Quote
Q1241274614 Posted June 26, 2015 Posted June 26, 2015 http://a2.qpic.cn/psb?/7d92c3a2-eb1f-4b0d-9a3e-237166ac1a87/s6KsHXzCmOugA25IObTY2nPioXXo35SZVBWqLw8hWpk![/img] see"] see Quote
CafeJr Posted June 26, 2015 Author Posted June 26, 2015 http://a2.qpic.cn/psb?/7d92c3a2-eb1f-4b0d-9a3e-237166ac1a87/s6KsHXzCmOugA25IObTY2nPioXXo35SZVBWqLw8hWpk![/img]see"] see There are something wrong Q1241274614... have nothing in your link... Thanks... Quote
CafeJr Posted June 26, 2015 Author Posted June 26, 2015 Hi, If you have more than one slide image to use in your program , it is recommended to use the same scale of the model space... For me I am almost not using slides anymore but anyway try to make a viewport with static scale... I don't think that the slide picture dimensions is accessible so if you implement what I have described earlier... Good luck. More one time... thanks Tharwat!... Only to try to show you what I'm doing!... The picture below have only one image view... and I wanna put all of toggle buttons (with different images) in that view... All the pictures (slides) are in the same format. I don't know why the view is not working!... The first image is ok, but when the toggle button is activate the screen turns black... AutoDesk - Image Tile-Handling Functions Reference (slide_image 1 1 100 60 "C:\\Lisp\\Desenvolvimento\\Slides\\slide-C.sld") This code fill the first image... the itens 100 and 60 adjust the size view... is that the only one difference that I can see in your code... Quote
Tharwat Posted June 26, 2015 Posted June 26, 2015 Post your codes with the slide images , and specify which image related to which toggle . Quote
CafeJr Posted June 26, 2015 Author Posted June 26, 2015 Tharwat, There are all the items!... Deti.dcl Detalhamento Instalacao.LSP Slides.rar Instalação material padrão_r0.dwg I'm grateful for your attention and help!... The Lisp code has some "drafts"... And the Slides are easy to identify!... Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.