CoCreate User Forum  

Go Back   CoCreate User Forum > Support > Customization

Reply
 
Thread Tools Search this Thread Rating: Thread Rating: 3 votes, 5.00 average. Display Modes
  #1  
Old 01-20-2011, 06:40 AM
micgiul micgiul is offline
Registered User
 
Join Date: Sep 2007
Posts: 34
File type

Hi
I write a new macro
Code:
(FILE_NAME     :value-type :filename 
                    :title "File"
                    :prompt-text "Select file to open"
                    :direction :input    
                    :after-input (progn
                                    ..................
                                    ..................
                                 )
    )
When open the file manager I want to view some type of file like .bdl or .pkg.

Thanks in advance

Ciao
Michele
Reply With Quote
  #2  
Old 01-20-2011, 08:00 AM
Andy Poulsen Andy Poulsen is offline
Administrator
 
Join Date: Apr 2003
Location: Fort Collins, Colorado
Posts: 273
Re: File type

Quote:
Originally Posted by micgiul View Post
Hi
I write a new macro
Code:
(FILE_NAME     :value-type :filename 
                    :title "File"
                    :prompt-text "Select file to open"
                    :direction :input    
                    :after-input (progn
                                    ..................
                                    ..................
                                 )
    )
When open the file manager I want to view some type of file like .bdl or .pkg.
I believe that if you add the :fileType modifier, you can get what you want. So something like this should work (Warning: not tested!):
Code:
(FILE_NAME     :value-type :filename 
                    :title "File"
                    :fileType :pkg
                    :prompt-text "Select file to open"
                    :direction :input    
                    :after-input (progn
                                    ..................
                                    ..................
                                 )
    )
Good luck!
__________________
Andy Poulsen
AI MAXTools: Dream. Design. Done. It's that easy!
Add-ins bringing new functionality and speed to Creo Elements/Direct and CoCreate products. Now available for v17-v20+!
See them in action at www.ai-maxtools.com and then try them for yourself -- FREE!
Reply With Quote
  #3  
Old 01-20-2011, 08:28 AM
micgiul micgiul is offline
Registered User
 
Join Date: Sep 2007
Posts: 34
Re: File type

Thank you!

But not work....

Please try again...

Thanks in advance

Ciao
Michele
Reply With Quote
  #4  
Old 01-20-2011, 09:03 AM
Andy Poulsen Andy Poulsen is offline
Administrator
 
Join Date: Apr 2003
Location: Fort Collins, Colorado
Posts: 273
Re: File type

Quote:
Originally Posted by micgiul View Post
Thank you!

But not work....

Please try again...

Thanks in advance

Ciao
Michele
OK, sorry -- I think it may be :package instead of :pkg. Does that work for you?
__________________
Andy Poulsen
AI MAXTools: Dream. Design. Done. It's that easy!
Add-ins bringing new functionality and speed to Creo Elements/Direct and CoCreate products. Now available for v17-v20+!
See them in action at www.ai-maxtools.com and then try them for yourself -- FREE!
Reply With Quote
  #5  
Old 01-20-2011, 11:14 PM
micgiul micgiul is offline
Registered User
 
Join Date: Sep 2007
Posts: 34
Re: File type

Yes!

ackage works for the .pkg....

but for the .bdl file I try :bundle, but it doesn't work....

Thanks in advance!

Ciao
Michele
Reply With Quote
  #6  
Old 01-21-2011, 02:23 AM
micgiul micgiul is offline
Registered User
 
Join Date: Sep 2007
Posts: 34
Re: File type

Hi...

I found one file called pesd_def.env in this directory
..\CoCreate Modeling 17.0\personality\pesd_def.env

I open this file and I find this...
Code:
(define-file-type :MI "")
(set_file_suffix :MI '("mi"))
(define-file-type :PACKAGE "")
(set_file_suffix :PACKAGE '("pkg"))
(define-file-type :PCL "")
(set_file_suffix :PCL '("pcl"))
(define-file-type :RECORDER "")
(set_file_suffix :RECORDER '("rec"))
(define-file-type :SD-PART "")
(set_file_suffix :SD-PART '("sdp"))
(define-file-type :SD-PART-CONTENTS "")
(set_file_suffix :SD-PART-CONTENTS '("sdpc"))
(define-file-type :SD-ASSEMBLY "")
(set_file_suffix :SD-ASSEMBLY '("sda"))
and more.....

I try to put

Code:
(define-file-type :BUNDLE "")
(set_file_suffix :BUNDLE '("bdl"))
but this operation doesn't work....

If write
Code:
(set_file_suffix :SOLIDDESIGNER '("bdl"))
works....

I don't know...

Ciao
Michele
Reply With Quote
  #7  
Old 01-25-2011, 09:56 AM
Wolfgang's Avatar
Wolfgang Wolfgang is offline
Registered User
 
Join Date: Nov 2002
Location: ... near Sindelfingen near Stuttgart, Germany
Posts: 754
Re: File type

the two documented integration kit functions
PHP Code:
(sd-get-file-type-keys...)
(
sd-inquire-file-type key &optional property
might be quite useful to know here

When you do something like this (only typed, not tested!)
PHP Code:
(dolist (a-key (oli:sd-get-file-type-keys) )
(
format T "~%Info on file type~S~%~{~%  ~S ~S~}~}~%" 
            
a-key (oli:sd-inquire-file-type a-key))) 
.. enter in command line.. and you should get a bunch of information in the console window (to be opened!)
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 10:25 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: