DXL attribute to display objURL crashes DOORS

I've been trying to display the object URL in a DXL attribute using the following code

// p_ObjURL
 
/*
*/
 
string objURL = getURL(obj)
 
obj.attrDXLName = objURL


display attribute p_ObjURL in a column, save view, close module, call view
and DOORS crashes ...

any ideas?
Karl


kabr - Wed Jun 09 08:54:40 EDT 2010

Re: DXL attribute to display objURL crashes DOORS
SystemAdmin - Wed Jun 09 10:31:04 EDT 2010

This is a bug in 8.3: you can not use getURL in a view and if I remember correctly it did not work in Layout DXL either. Was fixed in DOORS 9.0.

Re: DXL attribute to display objURL crashes DOORS
llandale - Wed Jun 09 13:51:20 EDT 2010

Don't know about this, but if Pekka is right then perhaps you can get around this as follows: Create a 2nd Attr-DXL that simply gets the value of this Attr-DXL: obj.attrDXLName = obj."p_ObjURL". Put that 2nd DXL in the view.

  • Louie

Re: DXL attribute to display objURL crashes DOORS
BillTidy - Fri Feb 17 07:11:11 EST 2012

Tearing my hair out with this one myself.
All I want is to display the object URL in a column.
Nothing seems to work, either as display nor as attribute DXL.
Does anyone have a snippet which shows the URL in a view?

Re: DXL attribute to display objURL crashes DOORS
BillTidy - Fri Feb 17 07:11:42 EST 2012

BillTidy - Fri Feb 17 07:11:11 EST 2012
Tearing my hair out with this one myself.
All I want is to display the object URL in a column.
Nothing seems to work, either as display nor as attribute DXL.
Does anyone have a snippet which shows the URL in a view?

PS: DOORS 9.3.0.6

Re: DXL attribute to display objURL crashes DOORS
BillTidy - Fri Feb 17 09:14:02 EST 2012

OK, finally figured it out as a DXL attribute...
Buffer displayBuffer = create

void endAttributeDXL()
{
if (!null obj && attrDXLName != "")
{
obj.attrDXLName = richText tempStringOf(displayBuffer)
}
delete displayBuffer
}

Object obj = current
displayBuffer = getURL(obj)
endAttributeDXL()

Re: DXL attribute to display objURL crashes DOORS
llandale - Fri Feb 17 14:08:46 EST 2012

BillTidy - Fri Feb 17 09:14:02 EST 2012
OK, finally figured it out as a DXL attribute...
Buffer displayBuffer = create

void endAttributeDXL()
{
if (!null obj && attrDXLName != "")
{
obj.attrDXLName = richText tempStringOf(displayBuffer)
}
delete displayBuffer
}

Object obj = current
displayBuffer = getURL(obj)
endAttributeDXL()

Look closely, all your Objects appear to have the same URL. That's because of this line

  • Object obj = current

Lets not confuse the "object being calculated" with the "current object". You are calculating the URL for whichever object is currently selected, and displaying it in this object. Delete that line and it works.

But so do these using v9304:

  • obj.attrDXLName = richText (getURL(obj))
  • obj.attrDXLName = getURL(obj)


Perhaps you can post the code that did not work.

-Louie

Are you using v9200 or v9201, which have a bug vis-a-vis updating Attr-DXL for deleted objects? The following code in the Attr-DXL adjusts for that:

 

if (isDeleted(obj)                                      and
    length(doorsInfo(infoVersion)) >=7                       and
    (((doorsInfo(infoVersion))[0:6] == "9.2.0.1") or
    (((doorsInfo(infoVersion))[0:6] == "9.2.0.0"))))  halt

 

Re: DXL attribute to display objURL crashes DOORS
AnitaS - Fri Mar 13 10:26:06 EDT 2015

llandale - Fri Feb 17 14:08:46 EST 2012

Look closely, all your Objects appear to have the same URL. That's because of this line

  • Object obj = current

Lets not confuse the "object being calculated" with the "current object". You are calculating the URL for whichever object is currently selected, and displaying it in this object. Delete that line and it works.

But so do these using v9304:

  • obj.attrDXLName = richText (getURL(obj))
  • obj.attrDXLName = getURL(obj)


Perhaps you can post the code that did not work.

-Louie

Are you using v9200 or v9201, which have a bug vis-a-vis updating Attr-DXL for deleted objects? The following code in the Attr-DXL adjusts for that:

 

if (isDeleted(obj)                                      and
    length(doorsInfo(infoVersion)) >=7                       and
    (((doorsInfo(infoVersion))[0:6] == "9.2.0.1") or
    (((doorsInfo(infoVersion))[0:6] == "9.2.0.0"))))  halt

 

Will someone post the complete script? The script will add column or I can add  the column  manually and write the URL to that column for each  object. I  am new to DXL.

Thanks,

Anita

 

Re: DXL attribute to display objURL crashes DOORS
AnitaS - Fri Mar 13 12:37:46 EDT 2015

AnitaS - Fri Mar 13 10:26:06 EDT 2015

Will someone post the complete script? The script will add column or I can add  the column  manually and write the URL to that column for each  object. I  am new to DXL.

Thanks,

Anita

 

I ran the script from Bill's reply, script ran without error but nothing happened. I also tried adding two lines from Louie reply that gave me error. I added a print statement to print the URL to DXL output , it gave me the syntax error. What I am doing wrong? Sincerely appreciate the help!

Buffer displayBuffer = create

void endAttributeDXL()
{
if (!null obj && attrDXLName != "")
{
obj.attrDXLName = richText tempStringOf(displayBuffer)
}
delete displayBuffer
}

Object obj = current
displayBuffer = getURL(obj)

print displayBuffer
endAttributeDXL()

Thanks,

Anita

Re: DXL attribute to display objURL crashes DOORS
Mike.Scharnow - Fri Mar 13 12:48:17 EDT 2015

AnitaS - Fri Mar 13 12:37:46 EDT 2015

I ran the script from Bill's reply, script ran without error but nothing happened. I also tried adding two lines from Louie reply that gave me error. I added a print statement to print the URL to DXL output , it gave me the syntax error. What I am doing wrong? Sincerely appreciate the help!

Buffer displayBuffer = create

void endAttributeDXL()
{
if (!null obj && attrDXLName != "")
{
obj.attrDXLName = richText tempStringOf(displayBuffer)
}
delete displayBuffer
}

Object obj = current
displayBuffer = getURL(obj)

print displayBuffer
endAttributeDXL()

Thanks,

Anita

given the various remarks: which DOORS version do you use?

Re: DXL attribute to display objURL crashes DOORS
Mike.Scharnow - Fri Mar 13 12:53:23 EDT 2015

AnitaS - Fri Mar 13 12:37:46 EDT 2015

I ran the script from Bill's reply, script ran without error but nothing happened. I also tried adding two lines from Louie reply that gave me error. I added a print statement to print the URL to DXL output , it gave me the syntax error. What I am doing wrong? Sincerely appreciate the help!

Buffer displayBuffer = create

void endAttributeDXL()
{
if (!null obj && attrDXLName != "")
{
obj.attrDXLName = richText tempStringOf(displayBuffer)
}
delete displayBuffer
}

Object obj = current
displayBuffer = getURL(obj)

print displayBuffer
endAttributeDXL()

Thanks,

Anita

If you use a current version of DOORS, just use the one line:

obj.attrDXLName = getURL(obj)

tested this with 9.6.0.1, no problem occurred.

Edit: As you're new to DXL: this code is for DXL attributes (Edit -> Attributes -> New -> give name / type: string / check "Add new attribute to current view" / check "DXL attribute"  -> Browse... -> New -> (paste the code) -> Check -> OK -> OK -> Close

Re: DXL attribute to display objURL crashes DOORS
AnitaS - Fri Mar 13 13:01:02 EDT 2015

Mike.Scharnow - Fri Mar 13 12:53:23 EDT 2015

If you use a current version of DOORS, just use the one line:

obj.attrDXLName = getURL(obj)

tested this with 9.6.0.1, no problem occurred.

Edit: As you're new to DXL: this code is for DXL attributes (Edit -> Attributes -> New -> give name / type: string / check "Add new attribute to current view" / check "DXL attribute"  -> Browse... -> New -> (paste the code) -> Check -> OK -> OK -> Close

My DOORS version is 9.5.

Re: DXL attribute to display objURL crashes DOORS
AnitaS - Fri Mar 13 13:07:04 EDT 2015

AnitaS - Fri Mar 13 13:01:02 EDT 2015

My DOORS version is 9.5.

Thank you, got it.

Re: DXL attribute to display objURL crashes DOORS
AnitaS - Fri Mar 13 13:27:21 EDT 2015

AnitaS - Fri Mar 13 13:07:04 EDT 2015

Thank you, got it.

which code shall I paste? It gave me the same URL for each object?

Re: DXL attribute to display objURL crashes DOORS
AnitaS - Fri Mar 13 13:35:02 EDT 2015

AnitaS - Fri Mar 13 13:27:21 EDT 2015

which code shall I paste? It gave me the same URL for each object?

I deleted  "Object obj = current". Then it worked okay.

Thanks,

Anita