Pulsonix User Forum

Technical advice from Pulsonix engineers and the wider community.

Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Help with using Pulsonix
 Scripting
 Value of design attribute
Author Previous Topic Topic Next Topic  

pebl97

Germany
1 Posts

Posted - 12 Apr 2017 :  15:27:19  Show Profile  Reply with Quote
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!

steve

United Kingdom
316 Posts

Posted - 12 Apr 2017 :  16:11:27  Show Profile  Reply with Quote
The change to make is:

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

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

Pulsonix Assistance
Go to Top of Page
  Previous Topic Topic Next Topic  
Jump To: