🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #14637

Re: [JS] How does the associated XMLElements property work?

#14637
From: Roberto Soto
Date: Mon, 26 Jan 2004 18:32
31 lines
1761 bytes
HI pjredman

You need to create a XMLTag and applied it to the object that you want to tag after. At this point this XMLElement (a Textframe) will have a associatedXMLElements property "ok".

Dim myInDesign As InDesign.Application
        Dim myDocument As InDesign.Document
        Dim myPage As InDesign.Page
        Dim myTextFrame As InDesign.TextFrame
        Dim myBounds() As Double = {10, 10, 20, 20}

Dim myTagName As String
        Dim myXMLTag As InDesign.XMLTag
        Dim myXMLElement As InDesign.XMLElement

myInDesign = CreateObject("InDesign.Application.CS")

If myInDesign.Documents.Count > 0 Then
            myDocument = myInDesign.ActiveDocument
            myPage = myDocument.Pages.Item(1)
            myTextFrame = myPage.TextFrames.Add
            myTextFrame.GeometricBounds = myBounds

myTagName = "TextFrame_1"
            myXMLTag = myDocument.XMLTags.Add(myTagName)
            myXMLElement = myDocument.XMLElements.Item("Root").XMLElements.Add(myXMLTag, myTextFrame)

Else
            MsgBox("No Document Found")
        End If

Roberto
Technical Details
Message-ID: <2ccf94be.0@webx.la2eafNXanI>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!webx
References: <2ccf94be.-1@webx.la2eafNXanI>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f939a,19f5d2c2e731681c
X-Google-Attributes: gidf939a,public
X-Google-ArrivalTime: 2004-01-26 10:38:17 PST
From: "Roberto Soto" <roberto1soto@yahoo.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!webx
Newsgroups: adobe.scripting.indesign
Subject: Re: [JS] How does the associated XMLElements property work?
Message-ID: <2ccf94be.0@webx.la2eafNXanI>
Date: Mon, 26 Jan 2004 10:32:17 -0800
References: <2ccf94be.-1@webx.la2eafNXanI>
Lines: 34
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit