CoCreate User Forum  

Go Back   CoCreate User Forum > Old NewsGroup Archive > Archive Forums > Solid Designer

 
 
Thread Tools Search this Thread Rate Thread Display Modes
  #1  
Old 10-03-2002, 07:19 PM
Gert
Guest
 
Posts: n/a
Test the availabality of user defined features

Hello all, I need to be able to test the difference between 1. whether a user-defined-feature (with a known name connected to a known part) is available (so still shown in the browser), but not connected to a face, an edge or a vertice anymore and 2. the user-defined-feature is not attached to a the part at all (so not shown in the browser). The command (sd-inq-feature-components ...) makes no difference, it returns nil in both cases. Thanks for your help.
  #2  
Old 10-15-2002, 01:11 AM
Dorothea
Guest
 
Posts: n/a
re: Test the availabality of user defined features

Hi Gert,

As far as I know a user-defined feature is deleted when it looses it's last reference. This would mean that the second case doesn't occur.
You could check the existance of a user-defined feature if you have the name of the parent part and the name of the feature with the function (sd-inq-part-named-features part). Parse the resulting list if a feature of the desired name is in the list or not.
This proposal is not very comfortable. Another possibility is to use the build in selector functionality. The syntax to select a user-defined feature you can for instance get with a recorder file. Start a recorder, double click the icon for an existing user-defined feature, stop the recorder and check the result with a text editor. Now replace the part and feature name with your names and pass the complete string to the dialog get_selection. A description for get_selection syntax you can find in the integration kit documentation. If the result is nil then the feature doesn't exist. In the other case you get a sel_item.

In principle your code could look like this:

  (setf my-feature   (sd-call-cmds    (oli:get_selection      :focus_type oli:*sd-feature-seltype*      :select      :FULL_NAME :START_NAME "/cube" :FEATURE "feat1" :END_NAME      )))  

Hope this helps,
Dorothea

  #3  
Old 10-16-2002, 09:58 PM
Gert
Guest
 
Posts: n/a
re: Test the availabality of user defined features

Hello Dorothea, Thanks for your reply, it helped me. Still 1 remark: a user-defined feature is not deleted when it looses it's last reference. Gert
 


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 Off
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT -8. The time now is 03:37 PM.



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: