CoCreate User Forum  

Go Back   CoCreate User Forum > Support > Customization

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
  #1  
Old 11-21-2007, 10:38 PM
stevenyuan stevenyuan is offline
Registered User
 
Join Date: Nov 2005
Posts: 33
add "rigidcable" module question

Dear everybody,
I have one problem about “RIGIDCABLE”.
I add “RIGIDCABLE” into module dialog.
(Open file: C:\Program Files\CoCreate\OneSpacemodeling 15.50b\personality\sd_customize\all_modules.dat, Add text to this file as follow:
("RigidCable"
:label "RigidCable"
:act-fun (mei::activate-ric)
:deact-fun (mei::deactivate-ric)
:startup :no )

So, in Module dialog, “RigidCable” have exist as picture-1
----------------------------------------------------------------------------
i hope that use it to activate and deactivate ‘RIGIDCABLE’ module.
I edit “sd_customize” file.
C:\Program Files\CoCreate\OneSpaceModeling 15.50b\personality\sd_customize\sd_customize

Add text as follow picture-2

(use-package li)
(require '"c:/Program Files/CoCreate/RigidCableAdvisor15/postproc.lsp")

(defun activate-ric()

(if (boundp 'SoCo_CABLES::sococabledir)
(progn
(sd-add-application-button "RigidCable"
:activateaction '(sd-switch-main-task-menu "RigidCable")
:cleanupaction '(sd-switch-main-task-menu "SolidDesigner"))

(sd-module-activate "RIGIDCABLE")
(SoCo_CABLES::create_rigidcable_main_menu)
)

(progn
(cd "c:/Program Files/CoCreate/RigidCableAdvisor15")
(load "startup.lsp")
)
)
)


(defun deactivate-ric()
(if (sd-module-deactivate "RIGIDCABLE")
(progn
(sd-destroy-main-task-menu "RigidCable")
(sd-remove-application-button "RigidCable")
(return-from deactivate-ric T)
)
)

)

-----------------------------------------------------------------------------------
Now, I can activate RIGIDCABLE module through check “RigidCable” button.
But I can’t deactivate this module through un-check “RigidCable” button.

can you tell me why?
Thanks very much!
Attached Thumbnails
Click image for larger version

Name:	picture-1.jpg
Views:	397
Size:	30.2 KB
ID:	993   Click image for larger version

Name:	picture-2.JPG
Views:	401
Size:	46.2 KB
ID:	994  

Last edited by stevenyuan; 11-21-2007 at 10:53 PM.
Reply With Quote
  #2  
Old 11-22-2007, 10:43 AM
Wolfgang's Avatar
Wolfgang Wolfgang is offline
Registered User
 
Join Date: Nov 2002
Location: ... near Sindelfingen near Stuttgart, Germany
Posts: 754
Re: add "rigidcable" module question

Just a tip for writing code here in that forum:
use [code] and [/code]
Code:
(defun deactivate-ric()
  (if (sd-module-deactivate "RIGIDCABLE")
    (progn
      (sd-destroy-main-task-menu "RigidCable")
      (sd-remove-application-button "RigidCable")
      (return-from deactivate-ric T)
    )
or try [php] and [/php]
PHP Code:
(defun deactivate-ric()
  (if (
sd-module-deactivate "RIGIDCABLE")
    (
progn
      
(sd-destroy-main-task-menu "RigidCable")
      (
sd-remove-application-button "RigidCable")
      (return-
from deactivate-ric T)
    ) 
Which is a little bit colorful, but coloring does not work every time (because color coding is not done for LISP)

have a look to: vB Code List

Last edited by Wolfgang; 11-28-2007 at 09:41 AM.
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 05:41 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.