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

Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X

adding a row to a table with a 2d repeat region

tski
1-Newbie

adding a row to a table with a 2d repeat region

I am trying to add a row to the bottom of a table that contains a 2d repeat region. When I use the code below, the row is added to the bottom of the table but I get an error message. When I use the same code on a dumb table, the row is added and I don't get an error.

If I run the application again, another row is added and I don't get an error message.

Has anyone tried this with some success on a table with a 2d repeat region?

ADD_DRW_TABLE_ROW MDL_DRAWING 2 1.0 ROW


Thanks


Anthony Mahynski
Advanced CAD Development Specialist
Engineering Services
hermanmiller.com
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.
2 REPLIES 2
jbeckley-2
3-Visitor
(To:tski)

Hi Tony,


Your problem stems from the fact that you're working with a 2D repeat region. These types of tables were designed to "auto-populate" their number of rows based on the data being dumped into them. Although we can manually add a blank row to the top or bottom of one of these tables, Creo has an issue with doing it automatically. It will generate the row, but it will throw an error back at us because it wants to try and auto-populate that row with data, or append something to the repeat region.


You can try to bracket the ADD_DRW_TABLE_ROW line within BEGIN_CATCH_ERROR and END_CATCH_ERROR statements, but I don't think the error catching will work for this scenario. If it does, let us know.


The best way around this is to manually add a blank row to the end of your saved repeat region table. As you found out, if a row already exists, Creo won't error out. Most people will set that blank row to a very small row height, making it look like a double line rather than a table row. Once it's there, the repeat reqion area will continue to work as designed, and then the ADD_DRW_TABLE_ROW command will work without a hitch.


Thank You,


Joel Beckley


Application Engineer


SIGMAXIM

tski
1-Newbie
(To:tski)

Joel,

Thanks for the response. The catch error scenario did not work for me. Adding a very small row on the bottom only works before I have the table fill automatically. I tried to add a row to the table that included the small row, after the table was automatically filled, and it still gave me an error.

We have a work around so I will let this issue rest.

Thanks

Anthony Mahynski
Advanced CAD Development Specialist
Engineering Services
hermanmiller.com
Top Tags