Welcome to Telelogic Product Support
  Home Downloads Knowledgebase Case Tracking Licensing Help Telelogic Passport
Telelogic DOORS (steve huntington)
Decrease font size
Increase font size
Topic Title: Auto inserting layout DXL
Topic Summary: Trying to define the layout DXL of an attribute within DXL Script
Created On: 13-Jul-2007 11:29
Status: Post and Reply
Linear : Threading : Single : Branch
Search Topic Search Topic
Topic Tools Topic Tools
Quick Reply Quick Reply
Subscribe to this topic Subscribe to this topic
E-mail this topic to someone. E-mail this topic
Bookmark this topic Bookmark this topic
View similar topics View similar topics
View topic in raw text format. Print this topic.
Answer This question was answered by Peter Albert, on Friday, July 13, 2007 2:45 PM

Answer:
The notation "layout DXL within some of the attributes" does not make sense. Attributes can't contain layout DXL, but columns in views may. As for creating layout DXL columns, the DXL code for this would be along the lines of

Column c = insert(column 1)
title(c, "My new column with layoutDXL")
width(c, 150)
dxl(c, "display obj.\"Object Text\"")

The last line assigns the actual layoutDXL code to the column. In the example, it just displays the current object's Object Text, but of course you can put any DXL code here. If you are going to write long DXL code, you might think of using #include, but then any user opening the module needs to have access to the file which is included, otherwise he will get an DXL error.

Hope that'll get you started,

Peter
 13-Jul-2007 11:29
User is offline View Users Profile Print this message


Kurtis Schnorr

Posts: 4
Joined: 18-May-2007

I am producing a new Module using DXL mainly to create a default and standard view and form for people to use. However I need to add in some layout DXL within some of the attributes. Searching through the help has not brought anything to the fore....
Does anyone have any ideas as to how to do this??
Report this to a Moderator Report this to a Moderator
 13-Jul-2007 12:39
User is offline View Users Profile Print this message


Peter Albert

Posts: 232
Joined: 30-Dec-2005

Answer Answer
The notation "layout DXL within some of the attributes" does not make sense. Attributes can't contain layout DXL, but columns in views may. As for creating layout DXL columns, the DXL code for this would be along the lines of

Column c = insert(column 1)
title(c, "My new column with layoutDXL")
width(c, 150)
dxl(c, "display obj.\"Object Text\"")

The last line assigns the actual layoutDXL code to the column. In the example, it just displays the current object's Object Text, but of course you can put any DXL code here. If you are going to write long DXL code, you might think of using #include, but then any user opening the module needs to have access to the file which is included, otherwise he will get an DXL error.

Hope that'll get you started,

Peter
Report this to a Moderator Report this to a Moderator
 13-Jul-2007 13:33
User is offline View Users Profile Print this message


David Pechacek

Posts: 674
Joined: 5-Dec-2006

If you want dynamically generated attribute values, you can use DXL Attributes which you create the same as any attribute, then select the attribute to be a DXL Attribute.

You then write the code to generate the attribute, ending the code with the assignment of obj."your attribute" = somegeneratedresult. "obj" is a predefined handle to each object in the module when the value in each object is generated. Same as in layout DXL.

-------------------------
David Pechacek
AAI Services Textron
dpechacek@sc-aaicorp.com
David.Pechacek@gmail.com
Report this to a Moderator Report this to a Moderator
 13-Jul-2007 14:44
User is offline View Users Profile Print this message


Kurtis Schnorr

Posts: 4
Joined: 18-May-2007

Cheers all
   Worked through your way Peter then went one step further and had the Main DXL script write the required Layout DXL to a file on startup thereby no need for any seperate files. a little cumbersome but all in one tidy package which has to be a good thing

Kurtis
Report this to a Moderator Report this to a Moderator
 16-Jul-2007 18:21
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

You can put the code into a separate file. The Layout definition code could then do as attached.

This lets you code naturally (without break-slashing all the slashes and quotes) and lets you insert actual code instead of an include statement.

Notice that if you change the code then you have to redefine the layout.

- Louie
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic DOORS forum.
There are currently 2 users logged in.
The most users ever online was 15 on 15-Jan-2009 at 16:36.
There are currently 0 guests browsing this forum, which makes a total of 2 users using this forum.
You have posted 0 messages to this forum. 0 overall.

FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.