Pulsonix User Forum

Technical advice from Pulsonix engineers and the wider community.

 All Forums
 Help with using Pulsonix
 Scripting
 AddAttribute Method

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
Heinrich Posted - 09 Feb 2018 : 11:09:55
Hello,
I can add a new attribute with this method.
But how can I change the usage of this new attribute
from Any Items to e.g. Design ??

Thanks for help !
4   L A T E S T    R E P L I E S    (Newest First)
steve Posted - 19 Feb 2018 : 11:16:47
You cannot do either of those things in the current implementation (alter the Show Name settings of an attribute name, or set built-in design level attributes). This has been logged as enhancement 43835.

Pulsonix Assistance
steve Posted - 14 Feb 2018 : 10:18:14
We will come back to you on this, but will not be able to till Monday at the earliest

Pulsonix Assistance
Heinrich Posted - 14 Feb 2018 : 09:50:24
Hello Steve,
thank you for your reply.
Perhaps my question was not precise enough.

I want to add an attribute to a design with a javascript.
I can do that with

var Design = ActiveDocument();
Design.AddAttribute( "PCB", "FR4");

This works. I can see the attribute "PCB" in my technology and the attribute has the right value.
Now i want to change e.g. the Show Name setting with my script.
How can I do that?

Another question is how I can change the value of a built-in attribute.

var Design = ActiveDocument();
Design.SetAttribute( "<Design Title>", "test");

This does not work. How can I dow that?

Thank you for your help!
Best regards
Heinrich

steve Posted - 09 Feb 2018 : 11:48:30
The attributes are defined in the Technology, so an attribute can be created there with the required usage, then added. Any possible change in type can be set there for current ones.

Pulsonix Assistance