PDA

View Full Version : how to inquire associated drawing/part from part/drawing respectively ?


Himanshu
05-09-2003, 08:51 AM
Hi friends,

can anybody tell me, what are commands to get

1) Associated Annotation drawing to part/assembly.
2) Associated part/assembly to Annotation drawing.


Actually I want to save both CAD Model(.sdp/.sdpc) and associated drawing(.mi) at one shot by command.

Your suggestions would be highly appreciable.

thanks in adavance.

-Himanshu

Thom Ivancso
05-09-2003, 11:14 AM
Do you need to save the Assembly and Parts as 3D Data if not you could save both the Model and the Drawing as one file using the Save As Bundle type in Annotator.

Himanshu
05-11-2003, 08:18 PM
Hi Thom,

actually I want to save Assembly and Parts as 3D Data only. It's specific requirement. So I can not use bundle format to save.

Please let me know if my problem can be solved even saving in 3D data format.


thanks,
Himanshu

ChrisE
05-12-2003, 06:54 AM
Hi Himanshu,

Look into the Integration Kit. You'll have to write some LISP code for that (I think)

Example path:

CoCreate/SolidDesigner%2011.5.0.165/help/Common/documentation/integration_kit/reference/inq_obj.html

There you inquire the children/parents of an object. This shall give you the information you need.

jkramer
05-12-2003, 10:59 PM
Hi,

CoCreate/SolidDesigner%2011.5.0.165/help/Common/documentation/integration_kit/reference/inq_obj.html

There you inquire the children/parents of an object. This shall give you the information you need.


I'm afraid this will only show the relations between 3D parts and Assies. I use the sd-inq-parent-obj for adding the parent assy of a part to the drawlist.

Regards,
Jaap Kramer

Thom Ivancso
05-13-2003, 03:12 AM
Hello Himanshu,

In the OSDM 11.60 am_customize file there is a setting that will force the opening of the save dialog window in modeling when a save to a drawing takes place. I will paste the entry from the am_customize file below.

;; To make sure that you always store Model and Drawing together, set
;; the following function to t and specify the store_3d_method
;; With (docu-store-model-and-drawing-together t ...) the system performs:
;; a) After saving the 2D drawing, the system opens the Save 3D Box corresponding
;; to the :STORE_3D_METHOD option (when there are still some parts marked as modified)
;; b) After saving the 3D model (Save Package, Save 3D Data or Save 3D Modified), the system
;; opens the Save 2D Box when the drawing is still marked as modified

(docu-store-model-and-drawing-together nil)
;; (docu-store-model-and-drawing-together t :STORE_3D_METHOD
;; :SD_PACKAGE or
;; :SD_DATA or
;; :SD_DATA_MODIFIED
;; )

NOTE: Only one 3D store method can be used and remove the "or" after the method because it will cause errors when loading Annotator if there.

Example:

;; (docu-store-model-and-drawing-together nil)
(docu-store-model-and-drawing-together t :STORE_3D_METHOD :SD_DATA)


It is not an automatic routine since you still need to choose the parts to save, but it could be a start.

Hope this helps
Thom

Himanshu
05-13-2003, 07:26 AM
Hi Thom,

thanks for taking interest in this issue. Solution you provided is not solving my problem as.....

1) when there are 2 parts(say p1 and p2) in an assembly and one of them(say p1) is associated with drawing. In this case when I save p2, then also save dialog gets poped up to save drawing. That I dont want.

2) It pops up save dialog, which I dont want as I want to work in background only with APIs.

preferably I want associated drawing/parts' handle(obj) to work with.

Even I looked into the page "CoCreate/SolidDesigner%2011.5.0.165/help/Common/documentation/integration_kit/reference/inq_obj.html" as ChrisE suggested,
but I couldn't get what I want.

thanks to all of you for taking interest..

anticipating few more suggestions from you ppl...

-Himanshu

pkehoe
05-16-2003, 01:10 PM
Originally posted by Himanshu
Hi friends,

can anybody tell me, what are commands to get

1) Associated Annotation drawing to part/assembly.
2) Associated part/assembly to Annotation drawing.


Actually I want to save both CAD Model(.sdp/.sdpc) and associated drawing(.mi) at one shot by command.

Your suggestions would be highly appreciable.

thanks in adavance.

-Himanshu

If your goal is saving both for OSDM, then there can only be
one drawing loaded, so there should be no reason for your
item 1) Associated Annotation drawing to part/assembly.

There is a way to accomplish your other request.
The attached file is a start. The function in it lists the names of all
parts that are used on a sheet. It should be possible to expand
this to include all sheets in a drawing.