Author Topic: Dialog Boxs for Blocks  (Read 7505 times)

0 Members and 1 Guest are viewing this topic.

PHX cadie

  • Water Moccasin
  • Posts: 1902
Dialog Boxs for Blocks
« 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
Acad 2013 and XM
Back when High Tech meant you had an adjustable triangle

daron

  • Guest
Dialog Boxs for Blocks
« Reply #1 on: July 08, 2005, 07:45:49 AM »
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?

PHX cadie

  • Water Moccasin
  • Posts: 1902
Dialog Boxs for Blocks
« Reply #2 on: July 08, 2005, 09:14:30 AM »
Phoenix, from Oxnard/Ventura CA. Its our first summer 8)
Acad 2013 and XM
Back when High Tech meant you had an adjustable triangle

daron

  • Guest
Dialog Boxs for Blocks
« Reply #3 on: July 08, 2005, 09:30:26 AM »
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.

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16899
  • Superior Stupidity at its best
Dialog Boxs for Blocks
« Reply #4 on: July 08, 2005, 09:58:28 AM »
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.
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

Find me on https://parler.com @kblackie

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Dialog Boxs for Blocks
« Reply #5 on: July 08, 2005, 11:03:57 AM »
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

CADaver

  • Guest
Dialog Boxs for Blocks
« Reply #6 on: July 08, 2005, 11:20:51 AM »
Beat me to it Charles.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Dialog Boxs for Blocks
« Reply #7 on: July 08, 2005, 11:30:21 AM »
:)
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

Amsterdammed

  • Guest
Dialog Boxs for Blocks
« Reply #8 on: July 09, 2005, 04:23:24 AM »
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

PHX cadie

  • Water Moccasin
  • Posts: 1902
Dialog Boxs for Blocks
« Reply #9 on: July 09, 2005, 11:47:26 PM »
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
Acad 2013 and XM
Back when High Tech meant you had an adjustable triangle

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16899
  • Superior Stupidity at its best
Dialog Boxs for Blocks
« Reply #10 on: July 10, 2005, 11:02:19 AM »
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
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

Find me on https://parler.com @kblackie

hudster

  • Gator
  • Posts: 2848
Dialog Boxs for Blocks
« Reply #11 on: July 11, 2005, 04:08:46 AM »
Here are a few excerpts from my menu.

This calls the 54_med library from my blocks menu.
Code: [Select]
[54 Medical Gases]^C^C$I=blocks.54_MED $I=*

This is the MG001 block inserted from the 54_med slide library.
Code: [Select]
[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
Revit BDS 2017, 2016, 2015, 2014, AutoCAD 2017, 2016, Navisworks 2017, 2016, BIM360 Glue

PHX cadie

  • Water Moccasin
  • Posts: 1902
Dialog Boxs for Blocks
« Reply #12 on: July 13, 2005, 12:26:06 AM »
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
Acad 2013 and XM
Back when High Tech meant you had an adjustable triangle

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Dialog Boxs for Blocks
« Reply #13 on: July 13, 2005, 12:32:37 AM »
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.

Code: [Select]

(defun c:testMOCO (/ ss p)
  (prompt "\nSelect objects:")
  (if (and (setq ss (ssget))
           (setq p (getpoint "\Pick base point:"))
      )
    (mocorosc ss p)
  )
  (princ)
)

Code: [Select]
(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)
)
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

PHX cadie

  • Water Moccasin
  • Posts: 1902
Dialog Boxs for Blocks
« Reply #14 on: July 13, 2005, 12:45:30 AM »
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:
Acad 2013 and XM
Back when High Tech meant you had an adjustable triangle

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Dialog Boxs for Blocks
« Reply #15 on: July 13, 2005, 12:51:05 AM »
Is the slide library on your search path ??

ie. can the proggy find the .SLB file from CAB's install ??
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

PHX cadie

  • Water Moccasin
  • Posts: 1902
Dialog Boxs for Blocks
« Reply #16 on: July 13, 2005, 01:04:59 AM »
Yes. The path d:\greg\misc\lisp\imgmenu011205 is in the Support File Search Path
Acad 2013 and XM
Back when High Tech meant you had an adjustable triangle

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Dialog Boxs for Blocks
« Reply #17 on: July 13, 2005, 01:21:35 AM »
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
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

TJAM51

  • Guest
Dialog Boxs for Blocks
« Reply #18 on: July 13, 2005, 08:18:07 AM »
I am having the same problem.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Dialog Boxs for Blocks
« Reply #19 on: July 13, 2005, 08:49:13 AM »
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:
Code: [Select]
 (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
  )
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

TJAM51

  • Guest
Dialog Boxs for Blocks
« Reply #20 on: July 13, 2005, 08:59:30 AM »
If you wanted to bring the symbols into the drawing based on the dimscale, how could this BE ACCOMPLISHED?



tHANKS

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Dialog Boxs for Blocks
« Reply #21 on: July 13, 2005, 09:14:40 AM »
Using this example:
Code: [Select]
(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
         )
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

TJAM51

  • Guest
Dialog Boxs for Blocks
« Reply #22 on: July 13, 2005, 09:17:45 AM »
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

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Dialog Boxs for Blocks
« Reply #23 on: July 13, 2005, 09:26:22 AM »
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.
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

PHX cadie

  • Water Moccasin
  • Posts: 1902
Dialog Boxs for Blocks
« Reply #24 on: July 13, 2005, 09:33:52 AM »
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 :)
Acad 2013 and XM
Back when High Tech meant you had an adjustable triangle

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Dialog Boxs for Blocks
« Reply #25 on: July 13, 2005, 10:54:34 AM »
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.
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Dialog Boxs for Blocks
« Reply #26 on: July 13, 2005, 10:56:48 AM »
Here is the corrected code:
Code: [Select]
(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)
)
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

PHX cadie

  • Water Moccasin
  • Posts: 1902
Dialog Boxs for Blocks
« Reply #27 on: July 13, 2005, 03:45:06 PM »
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 :)
Acad 2013 and XM
Back when High Tech meant you had an adjustable triangle

adalea03

  • Guest
Re: Dialog Boxs for Blocks
« Reply #28 on: September 29, 2006, 12:03:05 AM »
I organize my blocks in directories, and then employ the DosLib "dwg-preview" function.

GDF

  • Water Moccasin
  • Posts: 2081
Re: Dialog Boxs for Blocks
« Reply #29 on: September 29, 2006, 10:30:26 AM »
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
Why is there never enough time to do it right, but always enough time to do it over?
BricsCAD 2020x64 Windows 10x64

sinc

  • Guest
Re: Dialog Boxs for Blocks
« Reply #30 on: September 29, 2006, 02:29:41 PM »
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.

Arthur Gan

  • Guest
Re: Dialog Boxs for Blocks
« Reply #31 on: October 17, 2008, 01:58:36 PM »
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

deegeecees

  • Guest
Re: Dialog Boxs for Blocks
« Reply #32 on: October 17, 2008, 02:09:38 PM »
Icon Menu's?

GDF

  • Water Moccasin
  • Posts: 2081
Re: Dialog Boxs for Blocks
« Reply #33 on: October 17, 2008, 02:10:24 PM »
Arthur

Bricscad, does it read lisp the same way? My version is heavily modified and part of my overall program.

Gary
Why is there never enough time to do it right, but always enough time to do it over?
BricsCAD 2020x64 Windows 10x64