AutoCAD Map 3D Forum
Welcome to Autodesk’s AutoCAD Map 3D Forums. Share your knowledge, ask questions, and explore popular AutoCAD Map 3D topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

ADEDWGCLEAN - in VBA!!!!!

4 REPLIES 4
Reply
Message 1 of 5
skysin
393 Views, 4 Replies

ADEDWGCLEAN - in VBA!!!!!

Hi CAD People!
I try to run a routine to select object by object to check for the crosing objects in a drawing file using thisdrawing.sendcommand(etc) in VBA for the ADEDWGCLEAN function.
But unfortunetely I encounter a problem when the condition is not fullfil (no crossing object) becoz i set the commandline until the command trace and 'drawMarker' then 'eXit'. Because of this 2 line command, I can't go through if there is no crossing and the function will stop immediately when there is no error!
Can anyone giv me some good suggestion to overcome this problem since this is a ADE program.

please advice

from SKY
yeowsky@pd.jaring.my
4 REPLIES 4
Message 2 of 5
Anonymous
in reply to: skysin

In Lisp you have a complete set of drawing cleaning
functions.

It is more reliable to program it this
way.

I don't believe this API is available in
VBA.

--
Reinaldo Togores
Graphics Expression in
Engineering-CAD Research Group
University of Cantabria, Spain

href="http://personales.unican.es/togoresr/">http://personales.unican.es/togoresr/



style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
Hi
CAD People!
I try to run a routine to select object by object to check for
the crosing objects in a drawing file using thisdrawing.sendcommand(etc) in
VBA for the ADEDWGCLEAN function.
But unfortunetely I encounter a problem
when the condition is not fullfil (no crossing object) becoz i set the
commandline until the command trace and 'drawMarker' then 'eXit'. Because of
this 2 line command, I can't go through if there is no crossing and the
function will stop immediately when there is no error!
Can anyone giv me
some good suggestion to overcome this problem since this is a ADE program.

please advice

from SKY
yeowsky@pd.jaring.my

Message 3 of 5
skysin
in reply to: skysin

Reinaldo,
Thanks for the tips!
But aren't the drawing cleaning functions in Lisp is more similiar to "purge drawing process" ?
2nd, I still not very fimilar with the operating using the Lisp,can you please give me more information or the coding for the crossing object in the same layer in the Lisp? Or where can I find this Lisp code?

Thanks again 😆

Sky
yeowsky@pd.jaring.my
Message 4 of 5
Anonymous
in reply to: skysin

Hi:

Take a look at clean.lsp in your MAP's sample
directory.

For how to use the API, open the AcMapAds.chm
file.

Look under Topology Functions. You'll find the
following:

 

Cleanup Functions
Topology Functions
The
functions for cleaning topology objects before building the topology begin with
tpm_clean.

 

tpm_cleanalloc
Allocates the cleanup
model.

 

tpm_cleancancel
Cancels the cleanup process
without updating the drawing.

 

tpm_cleancomplete
Tests for a next group to be
cleaned.

 

tpm_cleanend
Completes the cleanup process and
updates the drawing.

 

tpm_cleanerrorcur
Sets the next error to clean
in the current group.

 

tpm_cleanerrordraw
Creates a temporary marker
for the current error.

 

tpm_cleanerrorfix
Fixes the current
error.

 

tpm_cleanerrorget
Gets the coordinates of the
current error.

 

tpm_cleanerrormark
Creates a persistent marker
for the current error.

 

tpm_cleanerrorset
Sets the coordinates of an
error fix point.

 

tpm_cleanfree
Frees the cleanup
model.

 

tpm_cleangroupdraw
Creates temporary markers for
all errors of the current group.

 

tpm_cleangroupfix
Fixes all errors of the
current group.

 

tpm_cleangroupmark
Creates persistent markers
for all errors of the current group..

 

tpm_cleangroupnext
Goes to the next error
group.

 

tpm_cleangroupqty
Counts the errors in the
current group.

 

tpm_cleangroupsubtype
Determines the subtype of
the current group.

 

tpm_cleangrouptype
Determines the type of the
current group.

 

tpm_cleaninit
Initializes the cleanup
model.

 

tpm_cleanstart
Starts the cleanup
process.

Good luck!

--
Reinaldo Togores
Graphics Expression in
Engineering-CAD Research Group
University of Cantabria, Spain.
Personal
WebSite:
href="http://personales.unican.es/togoresr/">http://personales.unican.es/togoresr/

 


style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
Reinaldo,

Thanks for the tips!
But aren't the drawing cleaning functions in Lisp
is more similiar to "purge drawing process" ?
2nd, I still not very
fimilar with the operating using the Lisp,can you please give me more
information or the coding for the crossing object in the same layer in the
Lisp? Or where can I find this Lisp code?

Thanks again 😆

Sky
yeowsky@pd.jaring.my

Message 5 of 5
skysin
in reply to: skysin

Hi Reinaldo,
I will try to look in to it.
Thanks for the help
Appreciate it very much

Sky

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost