Pulsonix User Forum

Technical advice from Pulsonix engineers and the wider community.

 All Forums
 Help with using Pulsonix
 Scripting
 Value of design attribute

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON

   Upload a file

Check here to subscribe to this topic.
   

T O P I C    R E V I E W
pebl97 Posted - 12 Apr 2017 : 15:27:19
Hi,

I use the scripting language of pulsonix to generate a report, which shows the value of an attribute of a design.
For example: The attribute name is Rev and the value is A1

Here is a code example (VB Script):

set Design = ActiveDocument()
set DesignAttr = Design.Attributes()

set Writer = NewReportWriter()
strFullName = Design.BasePathName() + ".htm"
Writer.Open strFullName, "", false
Writer.ISHtml = true

Writer.Write(Design.GetAttribute(Rev))

Writer.Close()
Writer.View()

When I run the code, the created HTML is empty. Any ideas what's wrong with my code?

Thanks in advance!
1   L A T E S T    R E P L I E S    (Newest First)
steve Posted - 12 Apr 2017 : 16:11:27
The change to make is:

Writer.Write(Design.GetAttribute("Rev"))

as you have to pass the attribute name as a text string

Pulsonix Assistance