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
 AddAttribute Method
Author Previous Topic Topic Next Topic  

Heinrich

Germany
9 Posts

Posted - 09 Feb 2018 :  11:09:55  Show Profile  Reply with Quote
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 !

steve

United Kingdom
316 Posts

Posted - 09 Feb 2018 :  11:48:30  Show Profile  Visit steve's Homepage  Reply with Quote
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
Go to Top of Page

Heinrich

Germany
9 Posts

Posted - 14 Feb 2018 :  09:50:24  Show Profile  Reply with Quote
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

Go to Top of Page

steve

United Kingdom
316 Posts

Posted - 14 Feb 2018 :  10:18:14  Show Profile  Visit steve's Homepage  Reply with Quote
We will come back to you on this, but will not be able to till Monday at the earliest

Pulsonix Assistance
Go to Top of Page

steve

United Kingdom
316 Posts

Posted - 19 Feb 2018 :  11:16:47  Show Profile  Visit steve's Homepage  Reply with Quote
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
Go to Top of Page
  Previous Topic Topic Next Topic  
Jump To: