CoCreate User Forum  

Go Back   CoCreate User Forum > Support > Customization
Register FAQ Calendar Today's Posts Search

Reply
 
Thread Tools Search this Thread Rating: Thread Rating: 4 votes, 5.00 average. Display Modes
  #1  
Old 04-23-2009, 03:07 AM
JDEespeel JDEespeel is offline
Registered User
 
Join Date: Aug 2007
Posts: 23
Return value text reference

Hallo,

Does anyone know the lisp-code that returns the value of a text reference from for eg.

(docu-register-tr-type "Sheet_local" "SHEET_SCALE" "???" 'docu::docu_inq_curr_sheet_scale_text)

I want to see the value of the scale.

Thanks
Reply With Quote
  #2  
Old 04-23-2009, 10:13 AM
Wolfgang's Avatar
Wolfgang Wolfgang is offline
Registered User
 
Join Date: Nov 2002
Location: ... near Sindelfingen near Stuttgart, Germany
Posts: 754
Re: Return value text reference

Quote:
Originally Posted by JDEespeel View Post
(docu-register-tr-type "Sheet_local" "SHEET_SCALE" "???" 'docu::docu_inq_curr_sheet_scale_text)
That's the register call.

To see the value (for test purpose??) you might want to call the function assignedto the text reference resp. specified during registration.
PHP Code:
(display (docu::docu_inq_curr_sheet_scale_text)) 
May be I misunderstand your question, because IMHO the solution is so near and clear.
Reply With Quote
  #3  
Old 05-04-2009, 10:43 PM
JDEespeel JDEespeel is offline
Registered User
 
Join Date: Aug 2007
Posts: 23
Re: Return value text reference

Thanks, that works.



In am_environment, I register:

(docu-register-tr-group "JDE" "TITLE")
(docu-register-tr-type "JDE" "NAME" "???" 'NM)

Now I want to display the falue of 'NM in annotation?
Reply With Quote
  #4  
Old 05-05-2009, 12:13 PM
Wolfgang's Avatar
Wolfgang Wolfgang is offline
Registered User
 
Join Date: Nov 2002
Location: ... near Sindelfingen near Stuttgart, Germany
Posts: 754
Re: Return value text reference

Just display or having a text in your sheet?

for 2nd..
1st create a text as a place holder, choose location and properties as you want
2nd assign a text reference to it.
in the text menu
use the group and the name .. at select the text created in 1st step.

you also have the choice to display the reference or their values.


BTW: NM is a very short function name and I personally would not use such a short name fo a function which has a very specific functionality
Reply With Quote
  #5  
Old 05-05-2009, 10:22 PM
JDEespeel JDEespeel is offline
Registered User
 
Join Date: Aug 2007
Posts: 23
Re: Return value text reference

I just want to display, it is already assigned to a text with reference.

I want to get the value that is filled in.
Reply With Quote
  #6  
Old 05-06-2009, 09:07 AM
Wolfgang's Avatar
Wolfgang Wolfgang is offline
Registered User
 
Join Date: Nov 2002
Location: ... near Sindelfingen near Stuttgart, Germany
Posts: 754
Re: Return value text reference

Quote:
Originally Posted by JDEespeel View Post
I just want to display, it is already assigned to a text with reference.
But then it IS already displayed.. in the drawing , in the Annotation view port.
Quote:
I want to get the value that is filled in.
Edit the text, use copy and paste?


Hmmmm.. it's still not clear to me what you want do.. continue guessing..

Call the function NM, but you have to pass in parameters then.

Trace the function NM and see in console window what it is returning.

Wild guessing: modify the function NM and add a (print result) at the end, where result is what the function does return normally.
Reply With Quote
  #7  
Old 05-10-2009, 11:05 PM
JDEespeel JDEespeel is offline
Registered User
 
Join Date: Aug 2007
Posts: 23
Re: Return value text reference

Hallo,

I wrote a macro so that we can fill in some text in the title in annotation like date, project number, client, ... with text references. Everithing works, but now I want to get the text back that is filled in.
Reply With Quote
  #8  
Old 05-11-2009, 09:04 AM
Wolfgang's Avatar
Wolfgang Wolfgang is offline
Registered User
 
Join Date: Nov 2002
Location: ... near Sindelfingen near Stuttgart, Germany
Posts: 754
Smile Re: Return value text reference

Long story.. but now I got it... may be


Integration Kit function (sd-am-inq-text-strings text)

The text contents you can get via
(setq my-text (cd-call-cmds (get_selection .... x,y)))

But this question has *nothing* to do with text references! This was wrong direction you pushed us to.

Alternative you'll write an Annotator macro (in Drafting syntax) and you'll call it via
Code:
(sd-execute-annotator-function :fnc "Jde_get_all_tr_contents_of_current_sheet")
depends on your current skills.
Reply With Quote
  #9  
Old 05-13-2009, 10:18 PM
JDEespeel JDEespeel is offline
Registered User
 
Join Date: Aug 2007
Posts: 23
Re: Return value text reference

Ok thanks.
Reply With Quote
  #10  
Old 02-15-2012, 05:34 AM
ngiacom ngiacom is offline
Registered User
 
Join Date: Feb 2012
Location: Bologna, Italy
Posts: 3
Re: Return value text reference

Hello. I'm a new "Lisp Customizer". I have to format "PTC_WM_MODIFIED_ON" Workgroup Manager Attribute (WTtr text reference group) that is in Annotation. This is the drawing's modified date in WINDCHILL. I have to put this formatted date in an other text reference. I registered my Text Reference Type with my function.
In this function I have to read ptc value. No functions are associated at "PTC_WM_MODIFIED_ON".
Ptc doesn't help me.
Can you help me?

How can I read existing Text reference type value from lisp?
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 05:29 AM.



Hosted by SureServer    Forums   Modeling FAQ   Macro Site   Vendor/Contractors   Software Resellers   CoCreate   Gallery   Home   Board Members   Regional User Groups  By-Laws  

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
You Rated this Thread: