Author Topic: My block lost  (Read 2542 times)

0 Members and 1 Guest are viewing this topic.

Adesu

  • Guest
My block lost
« on: June 12, 2007, 08:19:01 PM »
Hi Alls,
I just create a block, look at this code

Code: [Select]
(setq bn (getstring t "\nEnter name for block: ")) 
(setq ss (ssget))
(command "_wblock"  "bn" "" bp ss "")

After that the drawing is gone, I confuse and don't know where it drawing put.
any one know how to search it ?.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: My block lost
« Reply #1 on: June 12, 2007, 08:31:29 PM »
The file name is "bn" and should be in the same folder as the working drawing.
change to this to use the string stored in bn:
Code: [Select]
(command "_wblock"  [color=red]bn[/color] "" bp ss "")
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.

Adesu

  • Guest
Re: My block lost
« Reply #2 on: June 12, 2007, 09:11:20 PM »
Hi CAB,
it's great, and I revised that code as your suggest
Code: [Select]
(setq path "D:/YBI/Drawing/Data Base/Block/")                 
  (setq bn (getstring t "\nEnter name for block: "))           
  (setq loc (strcat path bn))                                   
  (setq bp (getpoint "\nClick as base point block: "))         
  (prompt "\nSelect object would become block")
  (setq ss (ssget))
  (command "_wblock" loc "" bp ss "")

Thanks you very much.


The file name is "bn" and should be in the same folder as the working drawing.
change to this to use the string stored in bn:
Code: [Select]
(command "_wblock"  [color=red]bn[/color] "" bp ss "")

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: My block lost
« Reply #3 on: June 12, 2007, 09:26:47 PM »
You are welcome. :-)
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.