cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X

Creo Weblink: CheckIfIsFromFormat(int) not working

Mat
13-Aquamarine
13-Aquamarine

Creo Weblink: CheckIfIsFromFormat(int) not working

Hi there,

 

I am running a little script to replace drawing formats.

 

tables = drawing.ListTables();

for (var i=0; i<tables.Count; i++)

{

var table = tables.Item(i);

if (table.CheckIfIsFromFormat(cur_sheet) == true)

{

 

var table_sel = drawing.GetTable(i);

 

// table is from format, delete it

drawing.DeleteTable(table, false);

}

}

 

As it turns out since Creo 2.0 M100 the function CheckIfIsFromFormat(cur_sheet) always returns a "true".

 

Can anyone confirm this behavior?

 

I see two ways to fix this:

Option A: PTC imediatly fixes this bug (But I guess this is going to happen in Creo 3.0 at the earliest.)

Option B: finding a way to get the position of the current table (like: "table.IsfromSheet").

 

Does anyone know, how to get the postion of a table?

 

 

Cheers

 

Matthias


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.
ACCEPTED SOLUTION

Accepted Solutions
Mat
13-Aquamarine
13-Aquamarine
(To:Mat)

PTC - Support told me that this new behavior is intended.

To Check, if a table is from a format frame (e.g. a company's A4 template) and if a table is the one on the current sheet you want to modify, You have to alter the script above to

if (table.CheckIfIsFromFormat(cur_sheet) == true && table.GetSegmentSheet(0) == cur_sheet )

{

...things to do

}

Works with M110!

View solution in original post

2 REPLIES 2
Mat
13-Aquamarine
13-Aquamarine
(To:Mat)

This error occurs in Version M90 as well.

M80 seems to work correct.

Bye

Matthias

Mat
13-Aquamarine
13-Aquamarine
(To:Mat)

PTC - Support told me that this new behavior is intended.

To Check, if a table is from a format frame (e.g. a company's A4 template) and if a table is the one on the current sheet you want to modify, You have to alter the script above to

if (table.CheckIfIsFromFormat(cur_sheet) == true && table.GetSegmentSheet(0) == cur_sheet )

{

...things to do

}

Works with M110!

Announcements
NEW Creo+ Topics: Real-time Collaboration


Top Tags