Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Insert+extrude help

10 REPLIES 10
Reply
Message 1 of 11
Anonymous
173 Views, 10 Replies

Insert+extrude help

I'm new to autolisp writing and I am trying to build a symbol library toolbar. I would like to create a pull-down that will have tumbnails of different trims i need. then i would like to be able to choose the one i want and insert it and extrude it. i know i need the -insert command, then explode the block, then extrude to length however i'm not sure how to link all of them. also i have know clue how to create the pull down i need. any suggestions at all would be appreciated.
10 REPLIES 10
Message 2 of 11
EC-CAD
in reply to: Anonymous

Sarczar,
A little confusing. Toolbars have little bitmaps (.bmp) files, and can be loaded, floated, moved on screen..thumbnails imply 'small' images (slide files .sld) that can be shown using the ***image section of a menu....pulldown implies the top menu bar would have a "string", and picking would expand to be a 'menu' (text based) to choose items from...
I suggest you make up generic sample trims, make .sld files (mslide), produce a slide library (file.slb), using SLIDELIB.exe, and placing the visible (thumbnails) on the ***image section of the .mns file. For each item, just do a lisp load, and pass it the name of the 'block' insert desired (example)..
***image
[Trim type 1]^c^c(setq blk "trim1")(load "insert_trim");
..
Then make up the insert_trim.lsp file, with the busy parts..
i.e.
(command "_-insert" blk pause """""")
(command "_explode" "l" "")
(command "_extrude" ...
or such..

Give it a try, and keep us posted.

Bob
Message 3 of 11
EC-CAD
in reply to: Anonymous

Correction: in ***image section, you need to specify the 'name' of the .slb (in your case, trims.slb)..
***image
[Select Trim]
[trims(trim1)]^c^c(setq blk "trim1")(load "insert_trim");
[trims(trim2)]^c^c(setq blk "trim2")(load "insert_trim");

Bob
Message 4 of 11
Anonymous
in reply to: Anonymous

i'm really new to this, so i hope this isn't too basic of a question, but when double click on the slidelib.exe icon,a dos type window flashes for a second then nothing happens. am i doing sometihng wrong?
Message 5 of 11
EC-CAD
in reply to: Anonymous

Sarczar,
1st things first. Do mslide for each 'block'. Save the .sld files in a temp folder. Copy the slidelib.exe to the temp folder.
In DOS Shell, cd\temp (or your temp folder name)
Next,
Dir *.sld /b >slides.lst
Next,
slidelib trims.slb
Exit

--------
Above should give you a file called trims.slb, with your slides
compressed into a 'slide library'.
Copy the trims.slb file to your AutoCAD\support folder.
You can delete the copy of slidelib.exe in the temp folder.
-----------
Next,
Edit your .mns file, search for the "***image" section.
Add the [trims(trim1)]....stuff there.

Bob
Message 6 of 11
EC-CAD
in reply to: Anonymous

If you are having trouble, don't understand, give me an email
at:
ec-cad@centurytel.net
We can work through it there.

Bob Shaw
Message 7 of 11
Anonymous
in reply to: Anonymous

thanks for the help. got put on a more pressing project, but hopefully i'll be back to it soon.
Message 8 of 11
MR.DEE
in reply to: Anonymous

ok. I back to this project after a long layoff, I hope you are still monitoring this board. here goes...
I created my slidelib, I have a empty pulldown, not I'm kind of lost. heres as far as I got
//
// AutoCAD menu file - H:\Documentation\Users\SCRA\MTEST.mnu
//

***MENUGROUP=DOCUMENTATION

***POP12

ID_DOCUMENTATION [&Documentation]

***image
[Select Trim]
[TRIM(trim-9)]^c^c(setq blk "trim-9")(load "insert_trim");

//
// End of AutoCAD menu file - H:\Documentation\Users\SCRA\MTEST.mnu
//

a couple of questions.

1. does my slidelib have to be in the same path as my .mns file

2. do I have to call this path out in the image files

3. what the hell am I doing?

this is what my pull down does.
Message 9 of 11
Anonymous
in reply to: Anonymous

Assuming you are using R2004, what you need to do is put your POP12 into the acad.mnu file and recompile. OR, you can make another menu, say MTEST.MNU using the acad.mnu with your POP12 inserted in the proper place. HOWEVER, to complete your new MTEST menu, you will need to copy acad.mns, acad.mnc and acad.mnr to another location and rename them all mtest.mnc, mtest.mns, mtest.mnr. Want to make it simple? I can send you a new acad.mnu with your POP12 and I can send you a new menu titled MTEST.
Message 10 of 11
Anonymous
in reply to: Anonymous

I take it back. You've got a combination of lsp routine and trying to insert something. Actually, I don't know "what the hell" you're doing either. What is "trim-9" and "insert_trim"?
Message 11 of 11
MR.DEE
in reply to: Anonymous

That would be helpful, thanks. will this help me with the slidelib problem I'm having? anyway here's my e-mail scrausch2@yahoo.com

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost