Alex Burnett

Revision symbol's relation to row doesn't change when deleting rows from table.

Discussion created by Alex Burnett on Jan 8, 2018
Latest reply on Jan 9, 2018 by Alex Burnett

Can anybody replicate this in SolidWorks releases past 2016 SP5?

 

I'll preface this by saying this is a minor issue but I want to see if anyone is able to replicate what I am seeing with your data, templates. etc. I don't need a workaround or anything as that's already taken care of. I'm simply wondering if this is still an issue.

 

My issue is that I have a bit of code written for a custom add-in to update the drawing template from an older one to a newer one. In this update, I read the data from the rows and columns of the old revision table and then I call GetRevisionSymbols(rowNumber) for each row of the table. This is then pasted into the new table and revision symbols are re-added according to their previously referenced row and position. A coworker had an issue when he deleted a row in the table AFTER assigning revision symbols to the rows that correspond with that revision. The macro was essentially offsetting everything after the deleted row and dropping of the last revision symbol altogether.

 

I narrowed down the issue to this. The referenced row of a revision symbol does not change when a row is deleted above the affected rows in the table. In the example shown below, I ran my update before deleting a row and the output shows in the last column the revision bubble data as [tag: rowNumber     textInBubble]. I deleted the 2nd row and re-ran the update and the output shows that the last 2 rows moved up 1 row since data was deleted. GetRevisionSymbols(rowNumber) returns the wrong row for the data now and messes up the revision table. It essentially returns data as if the row were never removed.

 

Normal Operation before deleting any rows:

ZONE   REV. MAJOR REV. MINOR    ER         DESCRIPTION      BY      DATE          Revision Bubble Info

A2     AA         01            5551100    UDPATE 1         AAA     1/5/2018      [tag: 2     01]

B2     AA         02            5551100    UPDATE 2         AAA     1/5/2018      [tag: 3     02]

B3     AA         03            5551100    UDPATE 3         AAA     1/5/2018      [tag: 4     03]

       AA         04            5551100    UPDATE 4         AAA     1/5/2018     

 

 

Deleted Minor Rev AA-02:

ZONE   REV. MAJOR REV. MINOR    ER           DESCRIPTION      BY     DATE          Revision Bubble Info

A2     AA         01            5551100      UDPATE 1         AAA    1/5/2018      [tag: 2     01]

B3     AA         03            5551100      UDPATE 3         AAA    1/5/2018     

       AA         04            5551100      UPDATE 4         AAA    1/5/2018      [tag: 4     03]    this rev bubble should be moved up 1 row

Outcomes