@@ -37,8 +37,6 @@ internal class UnmodelingCreator {
3737 private WorksetId ? _ws_id ;
3838 private FamilySymbol ? _famylySymbol ;
3939 private readonly string _libDir ;
40- private bool _numberParamInitialized ;
41- private SharedParam ? _numberParam ;
4240
4341 private const double _coordinateStep = 0.001 ;
4442 private double _maxLocationY = 0 ;
@@ -74,7 +72,8 @@ public void StartupChecks() {
7472 SharedParamsConfig . Instance . BuildingWorksSection ,
7573 SharedParamsConfig . Instance . BuildingWorksLevel ,
7674 SharedParamsConfig . Instance . BuildingWorksLevelCurrency ,
77- SharedParamsConfig . Instance . VISSettings
75+ SharedParamsConfig . Instance . VISSettings ,
76+ SharedParamsConfig . Instance . VISSpecNumbersCurrency
7877 ] ;
7978
8079 ProjectParameters projectParameters = ProjectParameters . Create ( _doc . Application ) ;
@@ -197,16 +196,6 @@ public void CreateNewPosition(NewRowElement newRowElement) {
197196 throw new InvalidOperationException ( "_ws_id is null" ) ;
198197 instWorkset . Set ( _ws_id . IntegerValue ) ;
199198
200- if ( ! _numberParamInitialized ) {
201- _numberParam = _doc . IsExistsParam ( SharedParamsConfig . Instance . VISSpecNumbersCurrency )
202- ? SharedParamsConfig . Instance . VISSpecNumbersCurrency
203- : SharedParamsConfig . Instance . VISSpecNumbers ;
204- _numberParamInitialized = true ;
205- }
206- if ( _numberParam is null ) {
207- throw new InvalidOperationException ( "_numberParam is null" ) ;
208- }
209-
210199 void SetUnmodelingValue ( FamilyInstance familyInstance , SharedParam sharedParam , object ? value ) {
211200 if ( value is null )
212201 return ;
@@ -234,7 +223,7 @@ void SetUnmodelingValue(FamilyInstance familyInstance, SharedParam sharedParam,
234223 SetUnmodelingValue ( familyInstance , SharedParamsConfig . Instance . VISItemCode , newRowElement . Code ) ;
235224 SetUnmodelingValue ( familyInstance , SharedParamsConfig . Instance . VISManufacturer , newRowElement . Maker ) ;
236225 SetUnmodelingValue ( familyInstance , SharedParamsConfig . Instance . VISUnit , newRowElement . Unit ) ;
237- SetUnmodelingValue ( familyInstance , _numberParam , newRowElement . Number ) ;
226+ SetUnmodelingValue ( familyInstance , SharedParamsConfig . Instance . VISSpecNumbersCurrency , newRowElement . Number ) ;
238227 SetUnmodelingValue ( familyInstance , SharedParamsConfig . Instance . VISMass , newRowElement . Mass ) ;
239228 SetUnmodelingValue ( familyInstance , SharedParamsConfig . Instance . VISNote , newRowElement . Note ) ;
240229 SetUnmodelingValue ( familyInstance , SharedParamsConfig . Instance . EconomicFunction , newRowElement . Function ) ;
0 commit comments