Jump to content

Make an Image Tile Menu from Pull-Down Menu


Recommended Posts

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

@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?

Link to comment
Share on other sites

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...

Link to comment
Share on other sites

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:

 

i15987_ScreenShot002.jpg

 

how can I get "Hello Santa" in new row?

is there a way to change style of words (bold, italic..)

Link to comment
Share on other sites

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??

Link to comment
Share on other sites

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:

i16176_ScreenShot002.jpg

 

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • 2 months later...

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

Link to comment
Share on other sites

  • 1 year later...

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?

Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...