PDA

View Full Version : :range command with relative path


Harry
01-09-2004, 03:43 AM
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...

Wolfgang
01-09-2004, 02:48 PM
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

Harry
01-12-2004, 03:50 AM
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?