DrawingPartBuilder Class¶
-
class
NXOpen.Features.ShipDesign.DrawingPartBuilder¶ Bases:
NXOpen.TaggedObject,NXOpen.GeometricUtilities.IComponentBuilderRepresents a
NXOpen.Features.ShipDesign.DrawingPartBuilder.This class is used to define a drawing part in Ship Section Drawing command, in this case user can define the drawing part manually as he want. Originally, we use a
NXOpen.Features.ShipDesign.SectionDrawingBuilderclass and a list ofNXOpen.Features.ShipDesign.SectionViewBuilderand the command will calculate the arrangement (like how many drawing parts/draw sheets need to create and which view in which sheet ) automatically. User can’t define which view in which sheet.In this project we make user has ability to define the arrangement in a tree like Drawing Part1 |- Drawing Sheet1 |-View1 |-View2 |- Drawing Sheet2 |- View3 |- View4 Drawing Part2 | - Drawing Sheet1 |- View5 |- View6
So we add
NXOpen.Features.ShipDesign.DrawingPartBuilderandNXOpen.Features.ShipDesign.DrawingSheetBuilderbetween them and make them has structure as below:NXOpen.Features.ShipDesign.SectionDrawingBuilderNXOpen.Features.ShipDesign.DrawingPartBuilderNXOpen.Features.ShipDesign.DrawingSheetBuilderNXOpen.Features.ShipDesign.SectionViewBuilderTo create a new instance of this class, use
NXOpen.Features.ShipDesign.SectionDrawingBuilder.CreateDrawingPartBuilder()New in version NX12.0.0.
Properties¶
| Property | Description |
|---|---|
| DrawingName | Returns or sets the drawing name |
| DrawingSheetList | Returns the drawing sheet list |
| Tag | Returns the Tag for this object. |
Methods¶
| Method | Description |
|---|---|
| CreateDrawingSheetBuilder | Creates a NXOpen.Features.ShipDesign.DrawingSheetBuilder |
| Validate | Validate whether the inputs to the component are sufficient for commit to be called. |
Property Detail¶
DrawingName¶
-
DrawingPartBuilder.DrawingName¶ Returns or sets the drawing name
-------------------------------------Getter Method
Signature
DrawingNameReturns: Return type: str New in version NX12.0.0.
License requirements: None.
-------------------------------------Setter Method
Signature
DrawingNameParameters: drawingName (str) – New in version NX12.0.0.
License requirements: nx_ship_drafting (“Ship Drafting”)
DrawingSheetList¶
-
DrawingPartBuilder.DrawingSheetList¶ Returns the drawing sheet list
-------------------------------------Getter Method
Signature
DrawingSheetListReturns: all drawing sheets in this part Return type: NXOpen.Features.ShipDesign.DrawingSheetBuilderListNew in version NX12.0.0.
License requirements: None.
Method Detail¶
CreateDrawingSheetBuilder¶
-
DrawingPartBuilder.CreateDrawingSheetBuilder¶ Creates a
NXOpen.Features.ShipDesign.DrawingSheetBuilderSignature
CreateDrawingSheetBuilder(drawingSheet)Parameters: drawingSheet ( NXOpen.Drawings.DrawingSheet) –Returns: Return type: NXOpen.Features.ShipDesign.DrawingSheetBuilderNew in version NX12.0.0.
License requirements: nx_ship_drafting (“Ship Drafting”)
Validate¶
-
DrawingPartBuilder.Validate¶ Validate whether the inputs to the component are sufficient for commit to be called.
If the component is not in a state to commit then an exception is thrown. For example, if the component requires you to set some property, this method will throw an exception if you haven’t set it. This method throws a not-yet-implemented NXException for some components.
Signature
Validate()Returns: Was self validation successful Return type: bool New in version NX3.0.1.
License requirements: None.