-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Specification object
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Specification object
In this example, we will consider setting up an object to correctly add it to the specification.
There is a script for inserting a rectangle:
SVersion = 2; ObjectDescription = "Example"; function ActHeader { NPart=0; Public( ); Protected( seted, a, b ); Changeable( ); OnDlgBeforeSelectParam = 0; ShowWhenSelPnt = 1; ContourOnLine = 0; }; function OnInitialization { if(seted == UnknownValue) { seted=1; rZOrder=100; a = 100; b = 100; }; }; function SetGripPoint { NGrip = 1; pntGrip0 = pntOrigin; }; function OnMakeParameters { strTheName = "Rectangle"; strTheType = "Rectangle"; strTheSubType = "Rectangle"; }; function OnDialog { UniDialog( VFLD, a,"a", b,"b", TVIDS,lViewType,"All",VIEW,"Vids"); }; function OnDialogChanged { ShowDesign(0, "Implementation1"); }; function OnChangeParameters { Handled = OBJ_HANDLED; }; function BeforeConnect { ResetLastConstraint(); } SpecPartition="Details"; strPartName = "Rectangle "+a+"x"+b;
For the correct addition of an object to the specification, added: a section of the specification and the name of the object in the specification.
The specification section is specified using the "SpecPartition" parameter. If the specified section is missing in the specification, the object will be added to the specification without the section. It is recommended to set the value using the resource table.
The object name in the specification is specified using the "strPartName" parameter. The value can be composite and generated using the "Part list entry wizard".
When you add the "#" symbol to the value of the name of the object, in the position editor it will be possible to insert text between two lattices with subsequent saving. When exporting a part list, the "#" symbol will not be displayed.
strPartName = "Motor 1MP2" + "-" + a + "-" + n + "-" + shema + "#"+ " " + "GOST 31591-2012";