Bring block defenition into drawing without being displayed.
CADForums.net Forum Index CADForums.net
Discussion of AutoCAD and other CAD software.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web cadforums.net
Bring block defenition into drawing without being displayed.

 
Post new topic   Reply to topic    CADForums.net Forum Index -> Customization
Author Message
Sage Cowsert
Guest





Posted: Thu Apr 07, 2005 7:07 pm    Post subject: Bring block defenition into drawing without being displayed. Reply with quote

I need block PCSACO2a in my drawing so I can use it as a custom arrowhead.
Right now I have my routine check to see if it exists and if it doesn't
insert then delete it. Is there a better way? I'd rather not see it flash on
the screen for a second but my method seems to work. I'm always looking for
a better mouse trap. Any ideas?


(if (= (tblsearch "block" "PCSAC02a") NIL)
(progn
(command "_.insert" "PCSAC02a.dwg" (getvar "viewctr") 1 1 0)
(command "_.erase" (entlast) "")
)
)

--
To reply via email remove 50 + 1 in my email address.

Back to top
Kent Cooper, AIA
Guest





Posted: Thu Apr 07, 2005 7:49 pm    Post subject: Re: Bring block defenition into drawing without being displa Reply with quote

You can cancel the Insert once it has brought in the definition, which it
does as soon as you give it the name, so as to be able to drag it to an
insertion point. There's no need to even get as far as giving it an
insertion point, much less the scales and rotation. If you don't even want
to see it appear at your cursor location momentarily for dragging into
place, you can turn dragmode off, call up Insert, give it the name, cancel,
then reset dragmode.

And by the way, you don't need to check whether it's in the drawing already.
That would only matter if it was in there, but with the wrong definition,
and you wanted to update the definition from the external drawing. But in
that case you'd want a routine that would anticipate the question of whether
you want to replace it, and provide the Yes answer. If that's not the
situation, plain old inserting (or starting to, anyway) will do just fine,
whether it's already in there or not.
--
Kent Cooper


"Sage Cowsert" wrote...
Quote:
I need block PCSACO2a in my drawing so I can use it as a custom arrowhead.
Right now I have my routine check to see if it exists and if it doesn't
insert then delete it. Is there a better way? I'd rather not see it flash
on the screen for a second but my method seems to work. I'm always looking
for a better mouse trap. Any ideas?

(if (= (tblsearch "block" "PCSAC02a") NIL)
(progn
(command "_.insert" "PCSAC02a.dwg" (getvar "viewctr") 1 1 0)
(command "_.erase" (entlast) "")
)
)
Back to top
Jeff Mishler
Guest





Posted: Thu Apr 07, 2005 8:57 pm    Post subject: Re: Bring block defenition into drawing without being displa Reply with quote

(if (not (tblsearch "block" "PCSAC02a") )
(progn
(command "_.insert" "PCSAC02a.dwg");gets the block def in the drawing
(command);cancels the insert command
)
)


--
Jeff
check out www.cadvault.com
"Sage Cowsert" <scowsert@pcsa51inc.com> wrote in message
news:42554cc7$1_2@newsprd01...
Quote:
I need block PCSACO2a in my drawing so I can use it as a custom arrowhead.
Right now I have my routine check to see if it exists and if it doesn't
insert then delete it. Is there a better way? I'd rather not see it flash
on the screen for a second but my method seems to work. I'm always looking
for a better mouse trap. Any ideas?


(if (= (tblsearch "block" "PCSAC02a") NIL)
(progn
(command "_.insert" "PCSAC02a.dwg" (getvar "viewctr") 1 1 0)
(command "_.erase" (entlast) "")
)
)

--
To reply via email remove 50 + 1 in my email address.


Back to top
 
Post new topic   Reply to topic    CADForums.net Forum Index -> Customization All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




Windows Server DSP VoIP Electronics New Topics
Powered by phpBB