CoCreate User Forum  

Go Back   CoCreate User Forum > Support > Customization

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
  #1  
Old 01-09-2004, 03:43 AM
Harry Harry is offline
Registered User
 
Join Date: Jan 2004
Posts: 85
:range command with relative path

I like to refer to some files which have a relative path and place these in a :range command.

see below.
=========================

(in-package :sample)
(use-package '(:OLI :docu))

;;(sd-defdialog 'load_sketch
;; :dialog-title "Load Sketch"

;; Place custom dir
(setf custom_dir (system::getenv "SDCORPCUSTOMIZEDIR"))

(setf filename1 (concatenate 'string custom_dir "/ANNOTA~1/Textblocks/CustomName_Sketch/file1.mi") )
(setf labelname1 "BOM EN")
(setf filename2 (concatenate 'string custom_dir "/ANNOTA~1/Textblocks/CustomName_Sketch/file2.mi") )
(setf labelname2 "BOM FR")
(setf filename3 (concatenate 'string custom_dir "/ANNOTA~1/Textblocks/CustomName_Sketch/file3.mi") )
(setf labelname3 "BOM GER")



(sd-defdialog 'load_text_block_CustomName
:dialog-title "Text Block CustomName"

:precondition
'(if (and (sd-am-inq-drawing-no) (sd-am-inq-curr-view-set))
:ok
(values :error "Please create a drawing and create/set viewset first.")
)
:variables
'(("Owner")
(type
:range ((:current-frame :label "current Frame")
(:current-sheet :label "current Sheet")
(:2dview :label "2d View")
(:sketch :label "sketch"))
:initial-value :current-sheet
:after-input (if (or (equal type :2dview) (equal type :sketch))
(progn
(sd-set-variable-status 'owner :enable t)
(setq owner nil))
(progn
(sd-set-variable-status 'owner :enable nil)
(setq owner " ")))
:size :third
)
(owner
:value-type :docupart
:initial-enable nil
:initial-value " "
:size :third
)
("Label")
(sketch
:range (( filename1 :label labelname1)
( filename2 :label labelname2)
( filename3 :label labelname3))
:initial-value filename3
)
(UI_Position
:value-type :docupntcnp
:title "Position"
:prompt-text ("Indicate Lower Right Text Block position" 1)
)
) ;; end variables
:ok-action
'(let ()
;; misc methods used to draw the sides of the box

;; load the specified sketch
(sd-am-load-sketch :file_name sketch
:position UI_Position
:adjust :lower_right
:owner_type type :owner owner)

) ;; end let
) ;; end sd-defdialog 'create-label

=========================

What is going wrong here?
I got an error in the sketch routine. The use of filename1 etc is not correct...

Last edited by Harry; 01-09-2004 at 05:15 AM.
Reply With Quote
  #2  
Old 01-09-2004, 02:48 PM
Wolfgang's Avatar
Wolfgang Wolfgang is offline
Registered User
 
Join Date: Nov 2002
Location: ... near Sindelfingen near Stuttgart, Germany
Posts: 754
Hi Harry,

I will ignore your original question, because looking to the thing you implemented I think you created something that already exists for a long time.

Have a look to:
help/english/pesd.ht/am_custom/am_customize.html
-> Sketches.

you can register your standard set of Sketches.. and loading them is just one click in the file browser, the option button.

You'll get a display table, the filenames are hidden and you'll see a description instead.

HTH
Reply With Quote
  #3  
Old 01-12-2004, 03:50 AM
Harry Harry is offline
Registered User
 
Join Date: Jan 2004
Posts: 85
Thanks for your reaction Wolfgang!

But I don't want the popup menu on the screen. Is there a way to use this docu-register table in my :range parameter?
Reply With Quote
Reply


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

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 08:50 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.