sumski Posted January 5, 2008 Share Posted January 5, 2008 I"m trying to create Image Tile Menu to insert most used blocks. So far, I"ve made slides, join them in slide library, I also made .mnu file and .scr file for commands for inserting blocks. Menu works acceptably (since I am amateur in programing), there are defect while I"m inserting blocks; I allways have to input x and y scale factor. And big problem is when inserting 2nd block, it insert first one instead second. How can I change .scr file to avoid that problems? I also want to make Image Menu from Pull-Down Menu, how can I do that? These are my .mnu and .src files: ***MENUGROUP=SHEETS ***POP1 **MojMenu MainHeader [M&ain] LineCmd [&Povrsina]^C^C_line 3dsurface [&3D Surfaces...]$I=SHEETS.image_sheets $I=SHEETS.* ***image **image_sheets [insert Sheet Block] [sheets(krug1,Krug1)]^C^C_.script blocks.scr [sheets(krug2,Krug2)]^C^C_.script blocks.scr ; Insert block _.insert krug1 0,0 _.insert krug2 0,0 I am appreciate for any help. Quote Link to comment Share on other sites More sharing options...
Strix Posted January 6, 2008 Share Posted January 6, 2008 by 'image menu' do you mean 'toolbar'? we have a FAQ for that, but I'm not sure if it's publicly viewable yet or if it's still work in progress anyway... right click any toolbar, and select 'customise' from the bottom of the list Quote Link to comment Share on other sites More sharing options...
CarlB Posted January 6, 2008 Share Posted January 6, 2008 Why have a separate scr file to insert block, why not have the code in the .mnu file? Especially since a script doesn't allow a pause for user input. To not have to enter block scale you'd need a script something like: ;begin script _.insert krug1 0,0 ;three blank lines above for "enters" for scales & rotation Quote Link to comment Share on other sites More sharing options...
sumski Posted January 6, 2008 Author Share Posted January 6, 2008 @Strix; no, its not toolbar, it is image menu e.g. 3D surfaces.. with separate window. Carl, with what section should I begin to write that script in mnu file? Can I only write that after [sheets(krug2,Krug2)]^C^C_.script blocks.scr with one blank line before? Quote Link to comment Share on other sites More sharing options...
sumski Posted January 6, 2008 Author Share Posted January 6, 2008 Inserting blocks problem is solved by entering line: [sheets(br1,Br1)]^C^C_.-insert br1;\;;; so I deleted .scr file since the code is already in .mnu Insertion is little imperfect, cross line (cursor) is positioning down-left from down-left corner of object, cca 1/7 of weigh. doubt the point is in Viewports... Quote Link to comment Share on other sites More sharing options...
sumski Posted January 12, 2008 Author Share Posted January 12, 2008 I created whole menu Its working properly, I am just wondering something about message window, if anyone could know I will be very appreciative: How to enter new line in message window? I have 2 separate phrases who can standalone menu item: TypeName [Hello](alert "Hello everyone Hello Santa ") looks like this: how can I get "Hello Santa" in new row? is there a way to change style of words (bold, italic..) Quote Link to comment Share on other sites More sharing options...
lpseifert Posted January 12, 2008 Share Posted January 12, 2008 Q1. (alert "Hello everyone \nHello Santa") Q2. not that I'm aware of. Quote Link to comment Share on other sites More sharing options...
sumski Posted January 12, 2008 Author Share Posted January 12, 2008 It works, but I have to press Enter twice. n doesnt make any diference. I tried with semicolons: (alert "Hello everyone\Hello Santa");; It did not make any significant change, except requesting to press Enter "only" once. Anyone knows solution?? Quote Link to comment Share on other sites More sharing options...
Cad64 Posted January 12, 2008 Share Posted January 12, 2008 (alert (strcat "\nHello everyone" "\nHello Santa")) Or if you want a space in between the two phrases (alert (strcat "\nHello everyone" "\n" "\nHello Santa")) Quote Link to comment Share on other sites More sharing options...
sumski Posted January 13, 2008 Author Share Posted January 13, 2008 Thanks for the answer, I tried with that line but it didnt make any change, I still have to press Enter, just 3 times with that code TypeName [About HortiLine](alert (strcat "\nHello everyone" "\nHello Santa")) looks like this: Seems that "n" doesnt make any different, backslash turns words in new line and that is known now, but how to insert ENTER in code, so not to have to press it after? Quote Link to comment Share on other sites More sharing options...
sumski Posted January 13, 2008 Author Share Posted January 13, 2008 Seems like the problem is in code. Apparently I need to use a different technique other than an (alert) box. I have to use other code to force AutoCAD message window, probably from acaddoc.lsp file, but I don"t know how to associate functions from lisp and menu files. Quote Link to comment Share on other sites More sharing options...
sumski Posted March 22, 2008 Author Share Posted March 22, 2008 Hy everyone I have small problem during inserting blocks from Image tile menu, if anyone knows I would be very appreciative; after creating slidelibrary and menu file, CAD simply don"t display all contents of that library; http://img169.imageshack.us/my.php?image=81180316hk0.jpg menu looks like this: [hortiline(Camelia_ j,Camelia japonica)]^C^C_.-insert Camelia_ j;\;;; [hortiline(Cedrus_a,Cedrus atlantica)]^C^C_.-insert Cedrus_a;\;;; [hortiline(Celtis_a,Celtis australia)]^C^C_.-insert Celtis_a;\;;; .... Slides and blocks have the same names (Camelia_j.....) And just one thing, how during inserting block, that block place in center of cross? (in my case there is a deviate from center, and its pretty annoying) Can anyone knows what could be a problem? Thanks Quote Link to comment Share on other sites More sharing options...
drwhite Posted November 9, 2009 Share Posted November 9, 2009 OK. I have read all the instructions on how to create a legacy tile menu. Did that. But the slidelib does not show up. The instructions are sort of like "Yes, Virginia, there is a Santa Claus, but here's just PART of the information you need to know about him". We used to put in $I=elecsym1 $I=* and up would come the slide library on the screen. At the end of the .mnu file we put the lisp routine Defun commands for the symbols on the screen as follows: **elecsym1 [select Logic Symbol] [elecsyb(nosw)]^C^Cnopb; and so on How do you do this now? Quote Link to comment Share on other sites More sharing options...
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.