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

avoid entering a block with "-insert"

  • Thread starter Thread starter anfaloni
  • Start date Start date

anfaloni

Guest
Bye to all,

I am continuing my lisp trip and found another rock, at least conceptual. . .
the insert command allows me to insert a block, as precisely from drop-down menu when we go to select insert block.
but the problem is that if you want to insert a saved dwg file apart but that already by itself is a block....how do I avoid being inserted into the drawing the block block?
I ask you because having a parametric block saved in a dwg to itself, if I call it in the drawing through the insert block "_insert" I lose the parameterization because it recalls it in the current design as block of the block....

there is a command similar to the "insert" that I care about in the drawing a block?...a kind of copy the contents of the drawing recalled and paste it into the current drawing
 
but possibly the scan option that you can flag within the interface window of the insert command, how can it be flanked?
 
Everything you can handle by keyboard commands can be passed via lisp by command.
if the command requires a dialogue (and therefore impossible to pass via lisp) , there is almost always a "version" of the exclusively textual command that bypasses this limit.

an example is the insert command. launched naked and raw, opens a dialogue .
if you place a hyphen (then the command becomes -insert) you will have it exclusively textual, so manageable via command
 
This is a beautiful magic!

thank you so much you know crystal that to tir!
but how do I insert it into the syntax?

For example. .

(setq b "c:\\\\lore.dwg")
(command "_insert" (*)b)

should it be used like that?
 
the -insert command only inserts existing blocks already in the design.
if you do not find it, do a search in the search paths contained in the autocad options.
I don't think you can insert a dwg with a path

in all cases your string would become
(setq b (strcat "*" name block)
(command "-insert" b coord etc etc)
 
the -insert command only inserts existing blocks already in the design.
if you do not find it, do a search in the search paths contained in the autocad options.
I don't think you can insert a dwg with a path

in all cases your string would become
(setq b (strcat "*" name block)
(command "-insert" b coord etc etc)
crystal I confirm that the insert command allows me to insert dwg with path, in fact I define the string variable specially for example

(setq block "c:\\\\lore.dwg")
(setq coord "0,0,0)
(command "_insert" block "" "")

I confirm that this works, but here..the problem is to enter this * within this way of proceeding. . .
say I should do:

(setq block1 (stract "*" block))
(command "_insert" block1 coord "" "")

I think it doesn't work.
 
(setq block1 (stract "*" block)
(command "_insert" block1 coord "" "")

I think it doesn't work.
correct:(setq block1 (strcat "*" block)works the same, but it is better to remove the double quotes un invio as for the insertion of a block explodes the required scale is worth x, y and z.(command "_-insert" blocco1 coord "" "")
 
correct:(setq block1 (strcat "*" block)works the same, but it is better to remove the double quotes un invio as for the insertion of a block explodes the required scale is worth x, y and z.(command "_-insert" blocco1 coord "" "")
I'll give me some piss alone hahahahahah. I didn't see that I wrote wrong strcat... cmq excellent, also works in this way, the string variable assumes the meaning "*c:\\\\\lore.dwg"

no block will not always be called lore, I inserted it in a while cycle with a variable that updates cycle on cycle according to the name of the block I want to open.

Thank you very much, now it works! but tell me why in the command command I see differently insert the function between various users...type "_insert" or "_-insert" or "_-.insert" but what does it mean?
 

Forum statistics

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

Members online

No members online now.
Back
Top