Message 1 of 4
Synchronous processing using the SendCommand

Not applicable
03-07-2002
01:54 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am going crazy trying to determine an event to produce synchronous
flow of the SendCommad method using Acad 2002. I am trying to put
together a program to insert our title block based on units and scale.
I have a user form ask for information regarding units and scale then
build a SendCommand Lisp argument based on the user input and then
execute the SendCommand method .
A little background. We only use one size of paper and actually we have
multiple title blocks in a single drawing file. This allows us to
update all information in one file, due to SDI through R14. We have
used templates DWT in the past and have 17 different DWT files based on
units and scale. I have the job of maintaining these files and would
rather not have to try to maintain 17 files. I want to use a DWG and
insert it as a block to scale and set the dimscale and textsize system
variables accordingly.
So after the user responds to the user form the title block is brought
in via the "ghost" image allowing the user to place the title block
exactly were they would like it, hence the reason to use SendCommand
instead of Insert method. Now the problem enters as I want to explode
the title block so the attribute information can be updated and allow
the system variables to be set. The problem is I have not found an
event I can use to sense the command is synchronously complete because I
am using a Lisp expression in my SendCommand method. All other code
runs in the procedure before the block is placed into the file. So the
find and explode procedure I call runs before it can find the block is
in the drawing.
I have tried using the LispEnd event of the document object but a call
to the find and explode procedure happens before the block is placed
because the Lisp routine has completed before the block is placed into
the file. The same problem occurs if I call the procedure after the
SendCommand method.
I have looked at the AcadX.arx written by Tony Tanzillo. I have not
fully digested all that can do as well as he makes the disclaimer not to
include use of the object in high end production processes as the
software is untested.
If anyone has work around a similar problem I would appreciate the
details of how you accomplished it. If anyone is doing a similar title
block task I would be interested in the details, if you are willing to
let go of them.
Thanks in advance,
Tony Nichols
Design Engineer
Vesuvius USA
flow of the SendCommad method using Acad 2002. I am trying to put
together a program to insert our title block based on units and scale.
I have a user form ask for information regarding units and scale then
build a SendCommand Lisp argument based on the user input and then
execute the SendCommand method .
A little background. We only use one size of paper and actually we have
multiple title blocks in a single drawing file. This allows us to
update all information in one file, due to SDI through R14. We have
used templates DWT in the past and have 17 different DWT files based on
units and scale. I have the job of maintaining these files and would
rather not have to try to maintain 17 files. I want to use a DWG and
insert it as a block to scale and set the dimscale and textsize system
variables accordingly.
So after the user responds to the user form the title block is brought
in via the "ghost" image allowing the user to place the title block
exactly were they would like it, hence the reason to use SendCommand
instead of Insert method. Now the problem enters as I want to explode
the title block so the attribute information can be updated and allow
the system variables to be set. The problem is I have not found an
event I can use to sense the command is synchronously complete because I
am using a Lisp expression in my SendCommand method. All other code
runs in the procedure before the block is placed into the file. So the
find and explode procedure I call runs before it can find the block is
in the drawing.
I have tried using the LispEnd event of the document object but a call
to the find and explode procedure happens before the block is placed
because the Lisp routine has completed before the block is placed into
the file. The same problem occurs if I call the procedure after the
SendCommand method.
I have looked at the AcadX.arx written by Tony Tanzillo. I have not
fully digested all that can do as well as he makes the disclaimer not to
include use of the object in high end production processes as the
software is untested.
If anyone has work around a similar problem I would appreciate the
details of how you accomplished it. If anyone is doing a similar title
block task I would be interested in the details, if you are willing to
let go of them.
Thanks in advance,
Tony Nichols
Design Engineer
Vesuvius USA