.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Tag update from API

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
kdaTZK4A
503 Views, 2 Replies

Tag update from API

I cannot figure out how to refresh Tag from .NET like the ASSIGNTAG command does

 

I am able to set the properties that the Tag is build from with DataLinksManager->Setproperties

I can see the properties change on the component. But the tag is not refreshed.

 

Is there some kind of .NET command that will rebuild the Tag?

2 REPLIES 2
Message 2 of 3
jabowabo
in reply to: kdaTZK4A

Setting the Tag value to an empty string will cause a recalculation of the tag. More info here: https://adndevblog.typepad.com/autocad/2012/10/autocad-pidplant-3d-is-there-any-api-to-recalculate-t...

 

Sample code (Test thoroughly before using on a live project):

StringCollection strNames = new StringCollection() { "Tag" };
StringCollection strNewValues = new StringCollection() { "" };

foreach (int rowId in rowIdsList)
{
	dlm.SetProperties(rowId, strNames, strNewValues);
}

dlm.AcceptChanges();

 

 

Message 3 of 3
kdaTZK4A
in reply to: jabowabo

Thank you for the reply.

It works when I assign the desired value to Tag property itself with SetProperties.
It does not cause a refresh when setting Tag to blank.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

AutoCAD Inside the Factory


Autodesk Design & Make Report