CoCreate User Forum  

Go Back   CoCreate User Forum > Support > Customization

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
  #1  
Old 06-20-2012, 07:12 AM
device0712 device0712 is offline
Registered User
 
Join Date: Nov 2009
Posts: 43
Call dialog from defun

Hi to all!
I am ashamed a bit but I do not know how to start a dialog (sd-defdialog) from a normal defun ....
Code:
(sd-defdialog 'EsplodiBOMDlg
  :dialog-title "Sel. Gruppo per BOM"
  :variables
  '(
    ;(ASSY :value-type :assembly :modifies :instance
    ;:title "Gruppo")
    
    (ASSY :value-type :assembly :modifies :nil 
     :initial-value (sd-inq-curr-part) :title "Gruppo")
   
        
    (LEVEL_TYPE
    :title "Livello"
    :range ("Multilivello" "Primo Livello" "Custom")
    ) ;; end LEVEL_TYPE
    
    (OUTPUT_TYPE
    :title "OutPut"
    :range ("TabView" "File TXT" "File XLS" "Custom")
    ) ;; end OUTPUT_TYPE
    
  )
  :local-functions
  '(
    (doit ()
      (let (NomeParte)
        (setf NomeParte (TITUS-ObjName ASSY))
        (EsplodiBOM NomeParte LEVEL_TYPE OUTPUT_TYPE)
      )
    )
   )
  :ok-action '(doit)
  :toolbox-button nil
)

(defun menu-action-on-assy-bom (obj name)
  ;(oli::sd-display-message "assemblato") ; lancia esporta bom
  ;(setf *objsel* (BrowserNode-objPath obj))
  (EsplodiBOMDlg)
)
don't ask me the assy end return error....
Can you help me?
Device
Reply With Quote
  #2  
Old 06-21-2012, 10:28 PM
Henk Stokkel Henk Stokkel is offline
Registered User
 
Join Date: Aug 2005
Location: Netherlands
Posts: 36
Re: Call dialog from defun

Under ASSY you only want assemblies but you want to make a part active This doesn't work. Use :value-type art-assembly or select the assy of the current part.
Reply With Quote
  #3  
Old 06-22-2012, 03:50 AM
clausb's Avatar
clausb clausb is offline
Registered User
 
Join Date: Nov 2002
Posts: 1,168
Re: Call dialog from defun

It's been a while, but IIRC, you may want to call the dialog via the sd-call-cmds helper (see IKIT).
__________________
CoCreate Modeling FAQ: http://www.clausbrod.de/CoCreateModeling/
Reply With Quote
  #4  
Old 06-22-2012, 04:06 AM
device0712 device0712 is offline
Registered User
 
Join Date: Nov 2009
Posts: 43
Re: Call dialog from defun

ok, with sd-call-dialog it's work fine!!!
thanks to all!!
Device
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 11:06 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.