I have written a program that basically replaces certain mvblocks, tags actually, in several drawings, the purpose being to change the displayed label of an object.
I have just 2 of the 3 affected drawings open and just 1 of those 2 is acually active at the time the program runs.
When I run the program the tags in the open and active drawing get replaced fine.
The tags in the open but NOT active drawing appear unchanged but a "regen" causes them to go away but the new tags do not appear, if I save, close, and reopen the drawing, as the drawing is reopening I see the new tags but the label text is offset and just prior to the drawing being fully open (back at "command" prompt) the tag text does move to its correct location. a save now saves the drawing correctly so on subsequent openings everthing is correct.
The tags in the unopened drawing, when I do open it, once again, I see the new tags but the label text is offset and just prior to the drawing being fully open (back at "command" prompt) the tag text does move to its correct location. a save now saves the drawing correctly so on subsequent openings everthing is correct.
Regardless of the state (open, unopen, active, inactive) I am running each drawing through the same subroutines to delete the old tag and put on the new as I am passing the drawing DB to the subroutines, the only difference being that I am putting a documentlock on the open drawings documents before I start the subroutines.
I do have the CommandFlags.Session flag set on the command that launches the progam.
So, what am i missing that the new tags are not showing up in the open but inactive dwg intill the drawing is saved and reopened, and then in both, open and inactive and the unopened dwg the label text appears offset until the dwg opens completely?
(sorry for the long post but, trust me, its shorter than my code!)
Solved! Go to Solution.
I'm not sure that I understand your issue well enough, but I solved a similar problem with calling the UpdateReferencingAttributes on the connected PropertySet.
Looks like you understood well enough.
I tried your suggestion and it correctly updates the tag text in all the drawings.
I will just need to change my approach so i just update the existing tag instead of replacing.
Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register