PDA

View Full Version : how to find a view belongs to which part


VINIT
01-09-2006, 03:03 AM
Annotation Module.

Dear all,

I have a viewset in a sheet, I want to know the partname/assemblyname for selected viewset using lisp by displaying it in a messagebox.

Can anyone guide/help me on this?

Regards,
Vinit

dorothea
01-09-2006, 04:03 AM
Hi Vinit,

Do you have the viewset as a sel_item in a dialog (lisp code)?
You inquire the name of an object using this function:
sd-inq-obj-basename
In the help you find more commands for inquiry of parent and names and pathes. Please check the following page:
reference/inq_obj.html

Diplaying strings in the output box can be done with the command 'display'.

Regards,
Dorothea

VINIT
01-10-2006, 07:46 PM
Hi Dorothea,

The user will just click/type the custom command name provided by my program and rest is done by program.

Actually my program scans all sheets,all viewsets and then from that collection, I have to find out, which view/viewset belongs to which part. This is to be done without asking input from user.

So which of following would work as per your suggestion?

(oli::sd-am-inq-name (oli::sd-am-inq-view-set (nth 0 (oli::sd-am-inq-all-view-sets))))

OR

(oli::sd-inq-obj-basename (oli::sd-am-inq-view-set (nth 0 (oli::sd-am-inq-all-view-sets))))

I also want to trim that whole path from root upto partname from the returned string from every viewset item returned.

Regards
Vinit

dorothea
01-10-2006, 09:57 PM
So which of following would work as per your suggestion?


Just try it out. I don't know much about Annotation inquiries. I just wanted to give you an idea where to start looking into the documentation.


I also want to trim that whole path from root upto partname from the returned string from every viewset item returned.

If you have a sel_item of an object, for instance a sel_item of a viewset, then you can inquire the parent of that object using function sd-inq-parent-obj. Please check the mentioned IKit page for more information.

HTH
Dorothea