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
kabr - Wed Jun 09 08:54:40 EDT 2010 |
Re: DXL attribute to display objURL crashes DOORS |
Re: DXL attribute to display objURL crashes DOORS
|
Re: DXL attribute to display objURL crashes DOORS 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:11 EST 2012 |
Re: DXL attribute to display objURL crashes DOORS 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 BillTidy - Fri Feb 17 09:14:02 EST 2012 Look closely, all your Objects appear to have the same URL. That's because of this line
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.
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 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
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.
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 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
print displayBuffer Thanks, Anita |
Re: DXL attribute to display objURL crashes DOORS 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
print displayBuffer Thanks, Anita given the various remarks: which DOORS version do you use? |
Re: DXL attribute to display objURL crashes DOORS 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
print displayBuffer 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 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: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: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: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 |