TheSwamp
Code Red => AutoLISP (Vanilla / Visual) => Topic started by: PHX cadie on July 07, 2005, 11:47:27 PM
-
Is there a tutorail for setting up slides for inserting blocks. Since moving to Arizonia I've seen several companies that have thier blocks set up as a dialog box with slides that when you click on one of the slides that block will insert. My new boss has mentioned setting up each preview as a slide, then image manager to set up a dialog box, but my Cad book does not get in much depth with slides, creating dialog boxs or image manager. If it helps what I am after is very similiar to what "Blockman" looks like. I've had a few replies, but I'm not looking to spend $50-$100
-
I don't have anything for you. I don't much care for sld's and blockwerx is the only thing I can think of, but it costs $. Where in AZ do you live? Where'd you move from?
-
Phoenix, from Oxnard/Ventura CA. Its our first summer 8)
-
I lived in Mesa and AJ for 16 years up until last year. Be sure you have air in your car and a water bottle. I was born in Oxnard, CA. Port Hueneme N.A.S.
-
you can create slides with MSLIDE, then if you look into menu creation and the IMAGE menu, you should be able to create an image driven menu and use the slides as previews.
-
You may want to check this out.
http://www.theswamp.org/phpBB2/viewtopic.php?t=3263&highlight=image
-
Beat me to it Charles.
-
:)
-
Hello WannaBeCader
I assume you already have a lot of dwg’s you need to make slides from. I had the some challenge for the Company I’m working for. Since I didn’t want to open a few thousand dwgs I ran a script file to “ mslide” the files.. For getting the script done I downloaded a cool standalone scriptmaker.exe from the Web. But that was a few years ago (R14) and I can’t find the link for you anymore. But if you want send me a mail an will mail it to you.
Bernd
-
Thanks to All :!:
I never got any response from another site, so I greatly appreciate everyones help. I'm not dumb, but not the sharpest knife in the kitchen, (you guys are more tech advanced than myself, for the moment :lol: )so it may take me a few days to digest this.
CAB, I'll try you're file it looks exactly like what I'm needing. Did you get a multiple ......page...library set up? Thanks!!!!!!
Hope CAB / Keith don't meet Dennis this weekend
-
Looks like we'll only get the fringes of it here .... The Tampa Bay area will get it a little harder .. but nothing like the swampers we have in Alabama and Mississippi
-
Here are a few excerpts from my menu.
This calls the 54_med library from my blocks menu.
[54 Medical Gases]^C^C$I=blocks.54_MED $I=*
This is the MG001 block inserted from the 54_med slide library.
[54_MED(MG001,Vacuum Outlet)]
look at this website Autodesk slidelib manager utility that will allow you to easily build your slide libraries. http://www.dotsoft.com/slideman.htm
-
CAB,
I feel like a "Mosquito" after reading some of the codes you guys are posting and I am exercising a lot of restraint, wanting to conceal my ignorance with a PM, :oops: but I can’t get the img_menu.lsp or mocorosc.lsp commands to take, though blkinsert works. I have loaded all 3 .lsp’s in the startup suite and added the folder to the Support File Search Path I think I am not using the correct command. Does defun mean define function? What is the command for img_menu.lsp or mocorosc.lsp?. Sorry to look a gift lsp in the mouth
Hope I’m not being a pain.
Hope Dennis left you alone
-
What happens when you type TEST at the command line < after loading img_menu.lsp>
added:
then load MOCOROSC.LSP and type TEST again.
Perhaps try this :
note : I haven't tried this, but it COULD work.
(defun c:testMOCO (/ ss p)
(prompt "\nSelect objects:")
(if (and (setq ss (ssget))
(setq p (getpoint "\Pick base point:"))
)
(mocorosc ss p)
)
(princ)
)
(defun c:testIMG (/ slide_lst sld-lib picked path)
(setq slide_lst '("ESYM-001" "ESYM-002" "ESYM-003" "ESYM-004" "ESYM-005" "ESYM-006"
"ESYM-007" "ESYM-008" "ESYM-009" "ESYM-010" "ESYM-011" "ESYM-012"
"ESYM-013" "ESYM-014" "ESYM-015" "ESYM-016" "ESYM-017" "ESYM-018"
"ESYM-019" "ESYM-020" "ESYM-021" "ESYM-022" "ESYM-023" "ESYM-024"
"ESYM-025" "ESYM-026" "ESYM-027" "ESYM-028" "ESYM-02A" "ESYM-030"
)
sld-lib nil ;"op-elec"
)
;; set path to "" or nil if using acad search path
;(setq path "C:\\OPTI\\LIBRARY\\ELEC\\")
(setq path "")
(while
(setq picked
(dcl_img_menu sld-lib ; name of slide library
slide_lst ; list of slide names
path ; path to the slides
"-=< Electrical Symbols >=-" ; Dialog Box Title
"[ Pick image to insert: ]" ; prompt on image box
3 ; number of rows 3
4 ; number of columns 4
7 ; image height
18; image width
)
)
(princ (strcat "\n" picked " slide selected."))
(command "-insert" (strcat path picked) pause "" "" pause)
)
(princ "\n*** User Quit ***")
(princ)
)
-
Typing "test" brings up a dialog box that is blank, but picking a blank slide to insert will insert the elec sym.
Now I'm really confused
You guys are quick, I logged back in to remind CAB of the old Chinese proverb "Teach a man how to fish and maybe they won't show up for dinner" :roll:
-
Is the slide library on your search path ??
ie. can the proggy find the .SLB file from CAB's install ??
-
Yes. The path d:\greg\misc\lisp\imgmenu011205 is in the Support File Search Path
-
What happens if you take the nil and comment from this line in the test routine ??
sld-lib nil ;"op-elec"
ie
sld-lib "op-elec"
I haven't tried it, but from a quick reading of the code, I think if no .SLB is passed in, the routine looks for sld files
-
I am having the same problem.
-
Kerry, thanks for the input...
You got it. :)
In the sample files, I sent a library file instead of individual slides & never updated the test.lsp
The code change as Kerry pointed out is:
(setq slide_lst '("ESYM-001" "ESYM-002" "ESYM-003" "ESYM-004" "ESYM-005" "ESYM-006"
"ESYM-007" "ESYM-008" "ESYM-009" "ESYM-010" "ESYM-011" "ESYM-012"
"ESYM-013" "ESYM-014" "ESYM-015" "ESYM-016" "ESYM-017" "ESYM-018"
"ESYM-019" "ESYM-020" "ESYM-021" "ESYM-022" "ESYM-023" "ESYM-024"
"ESYM-025" "ESYM-026" "ESYM-027" "ESYM-028" "ESYM-02A" "ESYM-030"
)
sld-lib "op-elec" ; <---<<< HERE, because you have a library
)
-
If you wanted to bring the symbols into the drawing based on the dimscale, how could this BE ACCOMPLISHED?
tHANKS
-
Using this example:
(command "-insert" (strcat path picked) pause "" "" pause)
written another way
(command "-insert"
(strcat path picked) ; block name
pause ; insertion point
"" ; X scale factor
"" ; Y scale factor
pause ; rotation angle
)
Change to this
(command "-insert"
(strcat path picked) ; block name
pause ; insertion point
(getvar "DimScale") ; X scale factor
"" ; Y scale factor <use X scale factor>
pause ; rotation angle
)
-
As I understand it.......this code would be used in the Blkinsert.lsp and each block would have it's own code for insertion with dimscale?
Thanks
-
There is no provisions for acquiring the scale needed for each block.
You would have to provide that by user input vis a PAUSE or via Lisp
in the form of a lookup table. If this information was in the block
as an attribute you could add code to acquire it.
-
CAB/Keith,
Should I cut/paste CAB updated code to the the img_menu.lsp? or should Keiths codes be saved as a lsp?
Is defun the command for a lsp? (defun mocorosc, therfore type mocorosc to run that lisp?
Is it poss to have several libraries/catagories with your program? ie civil blocks, struct, elec, notes etc.?
Keep in mind I'm just a mosquito :)
-
CAB/Keith, <--<< you mean Kerry not Keith
Should I cut/paste CAB updated code to the the img_menu.lsp? NO NO NO
Is defun the command for a lsp? it defines a function
In ACAD type VLIDE then click on help, click the INDEX tab, enter defun to see the help info.
(defun mocorosc, therefore type mocorosc to run that lisp? Well not exactly:
If the function is named (defun MyRoutine at the command line in acad you would type (MyRoutine)
If the function is named (defun c:MyRoutine at the command line in acad you would type MyRoutine
If the function is expecting arguments like (defun MyRoutine (arg1 arg2 / local vars) you
would have to supply the arg1 ans arg2
Is it poss to have several libraries/categories with your program? Yes, but I don't have the time
right now to walk you through it. My work load won't permit it. Perhaps someone else will help you
through the process, although this is a little complex for your first lisp project.
-
Here is the corrected code:
(defun c:test (/ slide_lst sld-lib picked path)
(setq slide_lst '("ESYM-001" "ESYM-002" "ESYM-003" "ESYM-004" "ESYM-005" "ESYM-006"
"ESYM-007" "ESYM-008" "ESYM-009" "ESYM-010" "ESYM-011" "ESYM-012"
"ESYM-013" "ESYM-014" "ESYM-015" "ESYM-016" "ESYM-017" "ESYM-018"
"ESYM-019" "ESYM-020" "ESYM-021" "ESYM-022" "ESYM-023" "ESYM-024"
"ESYM-025" "ESYM-026" "ESYM-027" "ESYM-028" "ESYM-02A" "ESYM-030"
)
sld-lib "op-elec" ; nil if no library file
)
;; set path to "" or nil if using acad search path
;(setq path "C:\\OPTI\\LIBRARY\\ELEC\\")
(setq path "")
(while
(setq picked
(dcl_img_menu sld-lib ; name of slide library
slide_lst ; list of slide names
path ; path to the slides
"-=< Electrical Symbols >=-" ; Dialog Box Title
"[ Pick image to insert: ]" ; prompt on image box
3 ; number of rows 3
4 ; number of columns 4
7 ; image height
18; image width
)
)
(princ (strcat "\n" picked " slide selected."))
(command "-insert" (strcat path picked) pause "" "" pause)
)
(princ "\n*** User Quit ***")
(princ)
)
-
Sorry Kerry
No prob, by no means do I want to impose. All have been a great help!
As far as complex, its never been my luck to start easy :)
-
I organize my blocks in directories, and then employ the DosLib "dwg-preview" function.
-
Is there a tutorail for setting up slides for inserting blocks. Since moving to Arizonia I've seen several companies that have thier blocks set up as a dialog box with slides that when you click on one of the slides that block will insert. My new boss has mentioned setting up each preview as a slide, then image manager to set up a dialog box, but my Cad book does not get in much depth with slides, creating dialog boxs or image manager. If it helps what I am after is very similiar to what "Blockman" looks like. I've had a few replies, but I'm not looking to spend $50-$100
I modified an older version of Hotblocks many years ago, you can download a newer version free from the link below.
;;; by Lintang Darudjati
;;; HotBlocks
;;; A block manager with INI style customization file and a dialog box performing collection-grouping,
;;; file path display, and slide previews as 'hot thumbnails'. Build your own dwg block library with it.
;;; And make them ready to be inserted easily anytime.
;;; http://www.geocities.com/RainForest/1073/download.html
Gary
-
If you wanted to bring the symbols into the drawing based on the dimscale, how could this BE ACCOMPLISHED?
It may be worth pointing out that this is very easy to accomplish with Tool Palettes.
There are a number of ways to use them. If you have an existing library of blocks created with 1 drawing for each block, the easiest way is to use Design Center to browse to the directory containing the blocks, then right-click on the directory and select "Create Tool Palette of Blocks".
If you have one drawing with a lot of blocks in it, browse to that drawing in Design Center, right-click on the drawing and select "Create Tool Palette".
Once you have created a tool palette, you can change the properties of multiple tools simultaneously by holding down the SHIFT button and selecting the tools you want. Or you can click in a blank area of the tool palette and hit CTRL-A to select all of them. Then right-click and select Properties, and change the Auxiliary Scale to "Dimscale". This will cause the blocks to be scaled by the current DIMSCALE as they are inserted.
-
hi gary,
i tried your hotblock with bricscad (www.bricsys.com) but could not run it successfully..
can you help to edit the code to run in bricscad?
regards, arthur gan
Is there a tutorail for setting up slides for inserting blocks. Since moving to Arizonia I've seen several companies that have thier blocks set up as a dialog box with slides that when you click on one of the slides that block will insert. My new boss has mentioned setting up each preview as a slide, then image manager to set up a dialog box, but my Cad book does not get in much depth with slides, creating dialog boxs or image manager. If it helps what I am after is very similiar to what "Blockman" looks like. I've had a few replies, but I'm not looking to spend $50-$100
I modified an older version of Hotblocks many years ago, you can download a newer version free from the link below.
;;; by Lintang Darudjati
;;; HotBlocks
;;; A block manager with INI style customization file and a dialog box performing collection-grouping,
;;; file path display, and slide previews as 'hot thumbnails'. Build your own dwg block library with it.
;;; And make them ready to be inserted easily anytime.
;;; http://www.geocities.com/RainForest/1073/download.html
Gary
-
Icon Menu's?
-
Arthur
Bricscad, does it read lisp the same way? My version is heavily modified and part of my overall program.
Gary