Skip to main content
7-Bedrock
Jun 28, 2019 3:51 PM UTC
Question

REMOVING UNUSED DRAWING MODELS

I need to remove all unused drawing models.

And I don't know if this is possible to do it with a macro or something like that.

can help me somebody?

Thank you,

Alberto Todisco

14 replies

17-Peridot
Jul 1, 2019 3:34 AM UTC
You can do this with ModelCHECK
Translate
7-Bedrock
Jul 1, 2019 12:26 PM UTC

Can you explain me the process?

Translate
17-Peridot
Jul 2, 2019 3:54 AM UTC

you need to set UNUSED_MODELS check to Y or E in your .mch file.

This works only if you have enabled ModelCHECK.

 

 

Translate
16-Pearl
Jul 2, 2019 8:51 PM UTC

Hi Alberto

If you don't use Modelcheck, but you are working with Windchill, you could use this creo config option:

cleanup_drawing_dependencies=yes_cs_not_required

More info in this Article

Translate
7-Bedrock
Jul 3, 2019 10:21 AM UTC

Hi Trebla,

that's the better solution!! thank you so much

Translate
RPN
18-Opal
Jul 26, 2019 11:15 PM UTC
# p-Shell
# „ps_draw delete“ will return 1 on success and 0 if fail
# if your case you may not interested
# and the code is ignoring the return value

# sample A
#
# if your active window contains a Drawing
#
foreach M [ps_draw list] {ps_draw -mod $M del }
# sample B
# # for all drawings in session
#
foreach D [ps_glob *.drw] { foreach M [ps_draw -draw $D list] {
ps_draw -draw $D -model $M delete
} }
# sample c
# # for test.drw
# foreach M [ps_draw -draw test.drw list] {
ps_draw -mod $M -draw test.drw delete
}
Translate
24-Ruby III
Jul 29, 2019 5:50 AM UTC

Hi,

please provide more information about p-Shell.

Translate
RPN
18-Opal
Jul 29, 2019 8:44 AM UTC

Link to p-Shell Wiki, and there a YouTube Link. Its a Toolkit Application, which allows you to access Creo Files and their Database via Tcl (Script Language) commands within a running Tcl/Tk environment. On the Wiki you find a lot of code snippets. You are ready with your first program in p-Shell, before you would have setup Toolkit and the compiler on the other hand Smiley Very Happy

Translate