• This forum is the machine-generated translation of www.cad3d.it/forum1 - the Italian design community. Several terms are not translated correctly.

program to import and insert blocks

  • Thread starter Thread starter yag
  • Start date Start date

yag

Guest
Hello I would have this need

in practice I have a .dwg file with many blocks
I would like to create a mask that lists me these blocks and how I click insert the block to the point that I tell them with the mouse

Can you do that?
 
I could also do it in vba but in lisp it works well in x64 versions, unlike the vba.

command: insblocks

the .dcl file must be in a directory indicated in the search paths (tools/options/files/support file search path)

bye
 

Attachments

I could also do it in vba but in lisp it works well in x64 versions, unlike the vba.

command: insblocks

the .dcl file must be in a directory indicated in the search paths (tools/options/files/support file search path)

bye
So do what I asked, but I have to do the list right?
 
the command lists the blocks contained in the open dwg, except for the unnamed ones.

bye
 
It's a part of code that is also used by other commands and that I have unified in my programs, so I escaped.

I re-attached the file, it should go now.

bye
 

Attachments

It's a part of code that is also used by other commands and that I have unified in my programs, so I escaped.

I re-attached the file, it should go now.

bye
works I'm trying to study my lips I'm programming decently in vba and other languages but lisp nn I've ever used it. . .

I don't understand
(seq selection ")
(seq selection)

imposed selection to "" and then do what selection is equal to itself?
 
@yag

(seq selection) maybe could be avoided, we will clarify rpor66, but the concept is not "imposti selection to "" and then do that selection is equal to itself", ma se (= rpcancel) then (seq selection ") otherwise (setq selection).
 
but then why not enter directly (setq selection nil) instead of (setq selection ""), since it still represents an exit pressing the cancel button?
 
I am of basic extraction, then become visual basic, in my functions that return string values, they return "" if they find nothing, otherwise the value sought.
habits are hard to die.... .
When I read a program, if I find "", I know by instinct what it means, I do not have to think it, so I transported this method also in the lisp.
Everything here, you can do it in a different way, I liked it so.

bye
 
No, no, it was absolutely not a criticism, indeed, I just wanted to understand. . .
here certainly there was not the problem, but it may be that in some cases (just, for the truth) I have the need to cancel a variable, then to nil. and the symbol "" for the lisp means a variable not cancelled.
 
if you want to have you listed the blocks of another dwg just enter the dwg in your drawing.

bye
 
alternative to reading blocks from an unopened design is to use the autocad design center
command: adc
 

Forum statistics

Threads
44,997
Messages
339,767
Members
4
Latest member
ibt

Members online

No members online now.
Back
Top