Quantcast
Channel: OpenBuildings | AECOsim | Speedikon | Forum - Recent Threads
Viewing all articles
Browse latest Browse all 4872

RE: Macro to change cell in the Annotation tool settings

$
0
0
Thank You Karsten.

Now it looks like this, and works great:

Sub subDoorLitteraCell(strC As String)
Dim strCell As String
strCell = strC
Set myXMLDocument = CreateObject("Microsoft.XMLDOM")

XMLFileName = ActiveWorkspace.ConfigurationVariableValue("PROJ") & "08 dataset\Dataset\setting\annotationoverrides.xml"
myXMLDocument.Load (XMLFileName)

Set myTitles = myXMLDocument.SelectNodes("//AnnotationToolSetting")
For Each myTitle In myTitles

Set myItems = myTitle.ChildNodes
For Each myItem In myItems

If myItem.Attributes.getNamedItem("name").Text = "Wall" Then

Set myParams = myItem.ChildNodes
For Each myParam In myParams
If myParam.Attributes.getNamedItem("name").Text = "Main Callout" Then
myParam.Attributes.getNamedItem("cell").Text = strCell
End If
Next myParam

End If

Next myItem
Next myTitle
myXMLDocument.Save (XMLFileName)
CadInputQueue.SendKeyin "mdl unload tfannotate"
CadInputQueue.SendKeyin "mdl load tfannotate"
CadInputQueue.SendCommand "DMSG ACTIVATETOOLBYPATH Annotation\Place DataGroup Annotation"
End Sub

Viewing all articles
Browse latest Browse all 4872

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>