Skip to main content
Sep 8, 2016 6:05 AM UTC
Question

How to compare the drawing files ?

suppose that we have the master file (.drw) and the file is created by the user (.drw)

how to check weather the user created is follows all the master file properties like(dimension, no of sheets, view templates)


This thread is inactive and closed by the PTC Community Management Team. If you would like to provide a reply and re-open this thread, please notify the moderator and reference the thread. You may also use "Start a topic" button to ask a new question. Please be sure to include what version of the PTC product you are using so another community member knowledgeable about your version may be able to assist.

6 replies

Sep 8, 2016 3:13 PM UTC

If you want to verify that the user drawing and the master drawing have the same number of sheets, you call ProDrawingSheetsCount on each and see if they are the same.  How this extends to other attributes you might want to check is particular to each.  You may wish to consider implementing your customization as an extension to ModelCHECK, so you can leverage the checks performed there.  Or not, if yours all require this other reference model to define the desired properties.

rboduAuthor
Sep 8, 2016 3:58 PM UTC

suppose we are opening the TWO (.drw) files in the same session

It is possible to compare the both the drawings with the API.

which API should use?

Sep 8, 2016 5:24 PM UTC

For the example given,

int n_sheets1, n_sheets2;

ProDrawingSheetsCount(p_drw1, &n_sheets1);

ProDrawingSheetsCount(p_drw2, &n_sheets2);

if (n_sheets1 != n_sheets2)

  /* difference found */


For other things you might want to check, you'd call other APIs as appropriate.  Since you haven't said what you're looking to check, it'd hard to give you exact code.