æ£çŽã«èšã£ãŠãç§ã¯VBããŸã£ããç¥ããŸãããã100幎åã«å€ãè¯ãBASICã§ã³ãŒããèŠããšããããã¯äººã ãããã°ã©ãã³ã°ã®åºç€ãåŠã³å§ããèšèªã®1ã€ãªã®ã§ãããã°ã©ã ã®æ®åã«å°ãè²¢ç®ããããšã«ããŸããã
Nanobrã§ã®VBã®äœ¿çšã«é¢ããHabrã«é¢ããè¯ãèšäºãæ¢ã«ãããšèšããªããã°ãªããŸãããNanoCADãšExcelã®çµã¿åãããšããããæçµçã«å»ºç¯èšèšã容æã«ããæ¹æ³ã«ã€ããŠèª¬æããŠããŸãã
å¥ã®ãããã·ã³ãã«ã§ããããç¥ãã®ã¿ã¹ã¯ã解決ããã¯ãªã¹ãã¹ããªãŒãæã㊠ããŠãŒã¶ãŒã«æ°å¹Žããç¥ãããŸãã ãã®èšäºã¯VBã«å°å¿µããŠãããšããäºå®ã«ããããããã CïŒã®ã³ãŒããåæ§ã«ãªããŸãã
ãŸãããæ°å¹Žãã¯è²»çšã®ãããäŒæ¥ã§ããããã NanoCAD 5.1ã®åçšå©çšã®ç¡æçã«çŠç¹ãåœãŠãŸãïŒãã ããçè«çã«ã¯NC 8.Xã§ã¯åé¡ãªãåäœããã¯ãã§ãïŒã
ãŸããMonoãšWineã䜿çšããCïŒã³ãŒããã³ã³ãã€ã«ããŠå®è¡ã§ãããããLinuxãŠãŒã¶ãŒããã€ãã¹ããŸããã
æ£çŽã«èšããšãç§èªèº«ãæè¿NanoCAD APIãç¿åŸãå§ããã®ã§ãä»å¹Žã®æåŸã®äŒæ¥ã®èšäºã¯ãã³ãŒãã®è€éãã®æãããã¥ãŒãã°ã©ãã£ãã¯ã¢ãŒãã£ã¹ããKengurenokïŒROOïŒããæãåºãããŸãã
PSããã¯ãHabrahabrããšããèšèã®æåã®æåã§ã-ãã以äžã¯ååã§ã¯ãããŸããã§ãã=ïŒ
ç§ã®æ°ãã趣å³ã¯ãã§ã«å°ããªã·ãªãŒãºã«ãªã£ãŠããã®ã§ã念ã®ããããã¿ãã¬ã®äžã«ä»¥åã®ãã¹ãŠã®èšäºãžã®ãªã³ã¯ãæ²èŒããŸãã
ãã®ä»ã®ãµã€ã¯ã«èšäº
- Multicad.NET API 7ã®å·ã®ãªãé¡ãŸãã¯æåã®ã¹ãããïŒNanocad 8.1ã®å ŽåïŒ
- MultiCAD.NET APIã䜿çšããNanoCADã§ã®ãã©ã ã®ãããªæ°ããã²ãŒãããŸãã¯ã«ã¹ã¿ã ãæ¬äŒŒ3Dããªããžã§ã¯ã
- ãç§ã¯ããªãããã©ããŒããŠããŸãããŸãã¯CADaããSCADAãäœæããæ¹æ³ïŒMultiCAD.NET APIïŒ
- ãçå®ã¯ééã£ãŠããããŸãã¯LinuxïŒMultiCAD.NET APIïŒã®äžã§NanoCADãããã°ã©ã ããã
ã¯ããã«ããã€ãã®ããã«ã ç§ã¯ããã°ã©ããŒã§ã¯ãªãããããã®èšäºã®ç§ã®èãããã¹ãŠ100ïŒ æ£ããããã§ã¯ãªãããšããŸãã ç§ããã·ã¢CADãæ®åããããšããã€ããªãã®ãŒã®çç±ãããNanoCADéçºè ãšã¯äœã®é¢ä¿ããªãããšãæãåºããŸãã
幎æ«ã«ã¯å€§éã®ããã¹ããäœæããããªãã®ã§ãèšäºã¯çããªããŸãããããåæããŸãã
å 容ïŒ
ããŒãIïŒã¯ããã«
ããŒãIIïŒCïŒã³ãŒãã®èšè¿°
ããŒãIIIïŒVBã§ã®ã³ãŒãã®èšè¿°
ããŒãIVïŒæ¥ãŠïŒ
ããŒãIIïŒCïŒã³ãŒãã®èšè¿°
NC 8.5ã®Visual Studio 2015ã§æ°ãããããžã§ã¯ããäœæããæ¹æ³
ä»åã¯ã奜å¥å¿ã®ããã«ããã軜éã®IDE Xamarin StudioïŒ MonoDevelop ïŒã§ãããžã§ã¯ããäœæããŸãããã
ããã»ã¹å šäœããã¿ãã¬ã®äžã«é ããŸãã
Xamarin Studio IDEã§NanoCAD 5.1ã®CïŒãããžã§ã¯ããäœæããæ¹æ³
ãŸããæ°ãããããžã§ã¯ããäœæããCïŒã¯ã©ã¹ã©ã€ãã©ãªãéžæããŸãã
圌ã«ååãã€ããŠ
次ã«ãRMBã§ãããžã§ã¯ããã¯ãªãã¯ããããã©ã¡ãŒã¿ãŒããã¿ã³ãéžæããŠããããžã§ã¯ããæ§æããŸãã
.Net 3.5ããŒãžã§ã³ãéžæ
次ã«ããããã°ã®äŸ¿å®äžããF5ãããŒãæŒããŠNanocadã®èµ·åãèšå®ããŸã
ïŒã³ãŒããå€æŽãããã³ã«ãNanocadãå®å šã«åèµ·åããå¿ èŠããããŸãïŒ
次ã«ãå³ã®å³åŽã«è¡šç€ºãããŠããã©ã€ãã©ãªãå¿ èŠãªã©ã€ãã©ãªãžã®ãªã³ã¯ãããŒãããŸã
ãããŒã«ã«ã«ã³ããŒãé ç®ããmapimgdã©ã€ãã©ãªã®ãã§ãã¯ãå€ãããšãå¿ããªãã§ãã ãã
å®ã¯ãF5ãæŒããŠãã¹ãŠãéå§ããããšã確èªããã³ãŒããèšè¿°ããããšã¯å®éã«ã¯æ®ã£ãŠããŸãã
ã©ã€ãã©ãªãããŒãããã«ã¯ãNanoCADã³ã³ãœãŒã«ã§Netloadã³ãã³ããå ¥åããdllãéžæããŸãïŒéåžžã¯ãããžã§ã¯ããã©ã«ããŒã«ãããŸããããšãã°ãCïŒ\ Users \ b \ Dev \ habr \ XMTree \ XMTree \ bin \ DebugïŒ
æ¯åãããããªãããã«
ã¢ãã¬ã¹Cã«ç§»åããŸãïŒ\ ProgramData \ Nanosoft \ nanoCAD 5.1 \ DataRWïŒå€æŽãããå ŽåããããŸãïŒããã³æ¬¡ã®å 容ã®load.configãã¡ã€ã«ãæ€çŽ¢ãŸãã¯äœæããŸã
ãã®åŸãããã°ã©ã ã®èµ·åæã«ã©ã€ãã©ãªãèªåçã«ããŒããããŸãã
圌ã«ååãã€ããŠ
次ã«ãRMBã§ãããžã§ã¯ããã¯ãªãã¯ããããã©ã¡ãŒã¿ãŒããã¿ã³ãéžæããŠããããžã§ã¯ããæ§æããŸãã
.Net 3.5ããŒãžã§ã³ãéžæ
次ã«ããããã°ã®äŸ¿å®äžããF5ãããŒãæŒããŠNanocadã®èµ·åãèšå®ããŸã
ïŒã³ãŒããå€æŽãããã³ã«ãNanocadãå®å šã«åèµ·åããå¿ èŠããããŸãïŒ
次ã«ãå³ã®å³åŽã«è¡šç€ºãããŠããã©ã€ãã©ãªãå¿ èŠãªã©ã€ãã©ãªãžã®ãªã³ã¯ãããŒãããŸã
ãããŒã«ã«ã«ã³ããŒãé ç®ããmapimgdã©ã€ãã©ãªã®ãã§ãã¯ãå€ãããšãå¿ããªãã§ãã ãã
å®ã¯ãF5ãæŒããŠãã¹ãŠãéå§ããããšã確èªããã³ãŒããèšè¿°ããããšã¯å®éã«ã¯æ®ã£ãŠããŸãã
ã©ã€ãã©ãªãããŒãããã«ã¯ãNanoCADã³ã³ãœãŒã«ã§Netloadã³ãã³ããå ¥åããdllãéžæããŸãïŒéåžžã¯ãããžã§ã¯ããã©ã«ããŒã«ãããŸããããšãã°ãCïŒ\ Users \ b \ Dev \ habr \ XMTree \ XMTree \ bin \ DebugïŒ
æ¯åãããããªãããã«
ã¢ãã¬ã¹Cã«ç§»åããŸãïŒ\ ProgramData \ Nanosoft \ nanoCAD 5.1 \ DataRWïŒå€æŽãããå ŽåããããŸãïŒããã³æ¬¡ã®å 容ã®load.configãã¡ã€ã«ãæ€çŽ¢ãŸãã¯äœæããŸã
<root> <list> <module path="C:\Users\...\bin\Debug\ .dll"/> </list> </root>
ãã®åŸãããã°ã©ã ã®èµ·åæã«ã©ã€ãã©ãªãèªåçã«ããŒããããŸãã
Linuxã§ãåæ§ã®æäœãå®è¡ã§ããŸããLinuxã§ã¯ãNanoCAD 5.1ãå®è¡ããã«ã¯Wineããããã°ã©ãã³ã°ã«ã¯MonoDevelopãå¿ èŠã§ãã ååã®èšäºã§è©³ãã説æããŸãã ã
æ®å¿µãªãããWineã§åé¡ãçºçããNanoCADã®è²ãã©ããã§å£ããŠãããããLinuxããªãŒã¯æ¬¡ã®ããã«ãªããŸãã
Linuxã§ã®ã¯ãªã¹ãã¹ããªãŒ
CïŒã³ãŒãã詳现ã«å解ããããšã¯ãããå®éã«ã¯æ°ããããšã¯äœãããŸããã
ã€ãŸããããªã©ã€ã³ãæç»ããŠã¹ãããŒã¯ãäœæããããŒã ãäœæããŸãã
ã¹ãã€ã©ãŒã®äžãšGitHubã®ã³ãŒãïŒVBçšã®ããŒãžã§ã³ããããŸãïŒã
Cã®NC 5.1ã®å®å
šãªã³ãŒãïŒ
//Use Microsoft .NET Framework 3.5 and old version of MultiCad.NET (for NC 5.1) //Class for demonstrating the capabilities of MultiCad.NET //Assembly for the Nanocad 5.1 //Link mapimgd from Nanocad SDK //Link System.Windows.Forms and System.Drawing //The commands: draws a christmas three. //This code in the part of non-infringing rights Nanosoft can be used and distributed in any accessible ways. //For the consequences of the code application, the developer is not responsible. //The code was not tested with NANOCAD 8.X. // However, it should work, if you update SDK libraries and include NC 8.X dll using System.Collections.Generic; using System.Linq; using Multicad.Runtime; using Multicad.DatabaseServices; using Multicad.Geometry; using Multicad.DatabaseServices.StandardObjects; using System.Drawing; using System.Windows.Forms; namespace XmasThree { class XmasThree { [CommandMethod("DXThree", CommandFlags.NoCheck | CommandFlags.NoPrefix)] public void DrawXThree() { Point3d _pntBase; Point3d _bufPnt; //prompts for installation point entry InputJig jig = new InputJig(); // Get the first box point from the jig InputResult res = jig.GetPoint("Select first point:"); //It works only if input was successful if (res.Result == InputResult.ResultCode.Normal) { // The base point is taken from the entry point (click with mouse) _pntBase = res.Point; //Draw the outline of the left half of the Christmas tree //Create base points for the polyline List<Point3d> leftPatrOfThreePoints = new List<Point3d>() { new Point3d(_pntBase.X, _pntBase.Y, 0), new Point3d(_pntBase.X-125, _pntBase.Y-154, 0), new Point3d(_pntBase.X-31, _pntBase.Y-137, 0), new Point3d(_pntBase.X-181, _pntBase.Y-287, 0), new Point3d(_pntBase.X-31, _pntBase.Y-253, 0), new Point3d(_pntBase.X-242, _pntBase.Y-400, 0), new Point3d(_pntBase.X-37, _pntBase.Y-400, 0), new Point3d(_pntBase.X-37, _pntBase.Y-454, 0), new Point3d(_pntBase.X, _pntBase.Y-454, 0) }; //Create a polyline (geometry) Polyline3d leftPatrOfThree = new Polyline3d(leftPatrOfThreePoints); //Create a polyline object and place it on the drawing DbPolyline XThreeLeft = new DbPolyline(); XThreeLeft.Polyline = new Polyline3d(leftPatrOfThree); XThreeLeft.Polyline.SetClosed(false); XThreeLeft.DbEntity.Color = Color.Green; XThreeLeft.DbEntity.AddToCurrentDocument(); //The right part of the tree is obtained by mirroring the left DbPolyline XThreeRight = new DbPolyline(); XThreeRight.DbEntity.Color = Color.Green; XThreeRight.Polyline = (Polyline3d)XThreeLeft.Polyline.Mirror(new Plane3d(_pntBase, new Vector3d(10, 0, 0))); XThreeRight.DbEntity.AddToCurrentDocument(); //From the right and left sides we make a single contour for hatching DbPolyline XThreeR = new DbPolyline(); XThreeR.DbEntity.Color = Color.Green; //XThreeR.Polyline = XThreeRight.Polyline.Clone() as Polyline3d; for NC 8.5 XThreeR.Polyline = XThreeRight.Polyline.GetCopy() as Polyline3d; //FOR NC 5.1 XThreeR.DbEntity.AddToCurrentDocument(); List<Point3d> hatchPoints = new List<Point3d>(); hatchPoints.AddRange(leftPatrOfThreePoints); hatchPoints.AddRange(XThreeR.Polyline.Points.Reverse().ToList()); Polyline3d hatchContur = new Polyline3d(hatchPoints); //We will create on the basis of a contour a hatch (geometry) with continuous filling Hatch hatch = new Hatch(hatchContur, 0, 10, true); hatch.PattType = PatternType.PreDefined; hatch.PatternName = "SOLID"; //Based on the geometry of the hatch, we create the document object, set its color properties - green DbGeometry dbhatch = new DbGeometry(); dbhatch.Geometry = new EntityGeometry(hatch); dbhatch.DbEntity.Color = Color.Green; dbhatch.DbEntity.AddToCurrentDocument(); // if you want you can try to draw balls with circles use // DrawThreeBalls(_pntBase); //Similarly, make a Christmas tree toy (octagon) //red _bufPnt = _pntBase.Subtract(new Vector3d(30, 95, 0)); DbPolyline dbOctoRed = DrawThreeOctogonPl(_bufPnt);//implicit dbOctoRed.DbEntity.AddToCurrentDocument(); Hatch hatchCirkRed = new Hatch(dbOctoRed.Polyline, 0, 1, false); hatchCirkRed.PattType = PatternType.PreDefined; hatchCirkRed.PatternName = "SOLID"; DbGeometry dbhatchCirkRed = new DbGeometry(); dbhatchCirkRed.Geometry = new EntityGeometry(hatchCirkRed); dbhatchCirkRed.DbEntity.Color = Color.Red; dbhatchCirkRed.DbEntity.AddToCurrentDocument(); //green _bufPnt = _pntBase.Subtract(new Vector3d(-40, 200, 0)); DbPolyline dbOctoGreen = DrawThreeOctogonPl(_bufPnt);//implicit dbOctoGreen.DbEntity.AddToCurrentDocument(); Hatch hatchCirkGreen = new Hatch(dbOctoGreen.Polyline, 0, 1, false); hatchCirkGreen.PattType = PatternType.PreDefined; hatchCirkGreen.PatternName = "SOLID"; DbGeometry dbhatchCirkGreen = new DbGeometry(); dbhatchCirkGreen.Geometry = new EntityGeometry(hatchCirkGreen); dbhatchCirkGreen.DbEntity.Color = Color.LightSeaGreen; dbhatchCirkGreen.DbEntity.AddToCurrentDocument(); //blue _bufPnt = _pntBase.Subtract(new Vector3d(-12, 350, 0)); DbPolyline dbOctoBlue = DrawThreeOctogonPl(_bufPnt);//implicit dbOctoBlue.DbEntity.AddToCurrentDocument(); Hatch hatchCirkBlue = new Hatch(dbOctoBlue.Polyline, 0, 1, false); hatchCirkBlue.PattType = PatternType.PreDefined; hatchCirkBlue.PatternName = "SOLID"; DbGeometry dbhatchCirkBlue = new DbGeometry(); dbhatchCirkBlue.Geometry = new EntityGeometry(hatchCirkBlue); dbhatchCirkBlue.DbEntity.Color = Color.Blue; dbhatchCirkBlue.DbEntity.AddToCurrentDocument(); //display the text with congratulations MessageBox.Show("I Wish You A Merry Christmas And Happy New Year!"); } } public Polyline3d DrawThreeOctogonPl(Point3d _pntB) { //Create points for an octagon List<Point3d> octoPoints = new List<Point3d>() { new Point3d(_pntB.X, _pntB.Y, 0), new Point3d(_pntB.X-15, _pntB.Y, 0), new Point3d(_pntB.X-25, _pntB.Y-11.3, 0), new Point3d(_pntB.X-25, _pntB.Y-26.3, 0), new Point3d(_pntB.X-15, _pntB.Y-37.6, 0), new Point3d(_pntB.X, _pntB.Y-37.6, 0), new Point3d(_pntB.X+9.7, _pntB.Y-26.3, 0), new Point3d(_pntB.X+9.7, _pntB.Y-11.3, 0), new Point3d(_pntB.X, _pntB.Y, 0) }; return new Polyline3d(octoPoints); } //Draws three balls instead of an octagon, can not earn in NanoCAD 8.X public void DrawThreeBalls(Point3d _pntB) { CircArc3d circarcRed = new CircArc3d(_pntB.Subtract(new Vector3d(30, 100, 0)), Vector3d.ZAxis, 15); DbCircArc dbCircarcRed = circarcRed;//implicit dbCircarcRed.DbEntity.AddToCurrentDocument(); Hatch hatchCirkRed = new Hatch(circarcRed, 0, 1, false); hatchCirkRed.PattType = PatternType.PreDefined; hatchCirkRed.PatternName = "SOLID"; DbGeometry dbhatchCirkRed = new DbGeometry(); dbhatchCirkRed.Geometry = new EntityGeometry(hatchCirkRed); dbhatchCirkRed.DbEntity.Color = Color.Red; dbhatchCirkRed.DbEntity.AddToCurrentDocument(); CircArc3d circarcGreen = new CircArc3d(_pntB.Subtract(new Vector3d(-40, 200, 0)), Vector3d.ZAxis, 15); DbCircArc dbCircarcGreen = circarcGreen;//implicit dbCircarcGreen.DbEntity.AddToCurrentDocument(); Hatch hatchCirkGreen = new Hatch(circarcGreen, 0, 1, false); hatchCirkGreen.PattType = PatternType.PreDefined; hatchCirkGreen.PatternName = "SOLID"; DbGeometry dbhatchCirkGreen = new DbGeometry(); dbhatchCirkGreen.Geometry = new EntityGeometry(hatchCirkGreen); dbhatchCirkGreen.DbEntity.Color = Color.LightSeaGreen; dbhatchCirkGreen.DbEntity.AddToCurrentDocument(); CircArc3d circarcBlue = new CircArc3d(_pntB.Subtract(new Vector3d(-12, 350, 0)), Vector3d.ZAxis, 15); DbCircArc dbCircarcBlue = circarcBlue;//implicit dbCircarcBlue.DbEntity.AddToCurrentDocument(); Hatch hatchCirkBlue = new Hatch(circarcBlue, 0, 1, false); hatchCirkBlue.PattType = PatternType.PreDefined; hatchCirkBlue.PatternName = "SOLID"; DbGeometry dbhatchCirkBlue = new DbGeometry(); dbhatchCirkBlue.Geometry = new EntityGeometry(hatchCirkBlue); dbhatchCirkBlue.DbEntity.Color = Color.Blue; dbhatchCirkBlue.DbEntity.AddToCurrentDocument(); } } }
çè«äžããã®ã³ãŒãã¯NC 8.Xã§ãåäœããã¯ãã§ãã察å¿ããããã容éïŒx64ãŸãã¯x86ïŒã®ã€ã³ã¯ã«ãŒããã©ã«ããŒãããããžã§ã¯ãã«mapibasetypes.dllããã³mapimgd.dllãå«ããããã«.NET Framework 4.0ãéžæãã1è¡ïŒå¯Ÿå¿ããã³ã¡ã³ããããå ŽåïŒãŸããDrawThreeBallsã¡ãœãããã³ã¡ã³ãåãŸãã¯åé€ããŸã
次ã®ããã«ãªããŸãã
Cã®NC 8.Xã®å®å
šãªã³ãŒãïŒ
//Use Microsoft .NET Framework 4 and old version of MultiCad.NET (for NC 8.X) //Class for demonstrating the capabilities of MultiCad.NET //Assembly for the Nanocad 8.X //Link mapimgd and mapibasetypes from Nanocad SDK //Link System.Windows.Forms and System.Drawing //The commands: draws a christmas three. //This code in the part of non-infringing rights Nanosoft can be used and distributed in any accessible ways. //For the consequences of the code application, the developer is not responsible. using System.Collections.Generic; using System.Linq; using Multicad.Runtime; using Multicad.DatabaseServices; using Multicad.Geometry; using Multicad.DatabaseServices.StandardObjects; using System.Drawing; using System.Windows.Forms; namespace XmasThree { class XmasThree { [CommandMethod("DXThree", CommandFlags.NoCheck | CommandFlags.NoPrefix)] public void DrawXThree() { Point3d _pntBase; Point3d _bufPnt; //prompts for installation point entry InputJig jig = new InputJig(); // Get the first box point from the jig InputResult res = jig.GetPoint("Select first point:"); //It works only if input was successful if (res.Result == InputResult.ResultCode.Normal) { // The base point is taken from the entry point (click with mouse) _pntBase = res.Point; //Draw the outline of the left half of the Christmas tree //Create base points for the polyline List<Point3d> leftPatrOfThreePoints = new List<Point3d>() { new Point3d(_pntBase.X, _pntBase.Y, 0), new Point3d(_pntBase.X-125, _pntBase.Y-154, 0), new Point3d(_pntBase.X-31, _pntBase.Y-137, 0), new Point3d(_pntBase.X-181, _pntBase.Y-287, 0), new Point3d(_pntBase.X-31, _pntBase.Y-253, 0), new Point3d(_pntBase.X-242, _pntBase.Y-400, 0), new Point3d(_pntBase.X-37, _pntBase.Y-400, 0), new Point3d(_pntBase.X-37, _pntBase.Y-454, 0), new Point3d(_pntBase.X, _pntBase.Y-454, 0) }; //Create a polyline (geometry) Polyline3d leftPatrOfThree = new Polyline3d(leftPatrOfThreePoints); //Create a polyline object and place it on the drawing DbPolyline XThreeLeft = new DbPolyline(); XThreeLeft.Polyline = new Polyline3d(leftPatrOfThree); XThreeLeft.Polyline.SetClosed(false); XThreeLeft.DbEntity.Color = Color.Green; XThreeLeft.DbEntity.AddToCurrentDocument(); //The right part of the tree is obtained by mirroring the left DbPolyline XThreeRight = new DbPolyline(); XThreeRight.DbEntity.Color = Color.Green; XThreeRight.Polyline = (Polyline3d)XThreeLeft.Polyline.Mirror(new Plane3d(_pntBase, new Vector3d(10, 0, 0))); XThreeRight.DbEntity.AddToCurrentDocument(); //From the right and left sides we make a single contour for hatching DbPolyline XThreeR = new DbPolyline(); XThreeR.DbEntity.Color = Color.Green; XThreeR.Polyline = XThreeRight.Polyline.Clone() as Polyline3d; // for NC 8.5 //XThreeR.Polyline = XThreeRight.Polyline.GetCopy() as Polyline3d; //FOR NC 5.1 XThreeR.DbEntity.AddToCurrentDocument(); List<Point3d> hatchPoints = new List<Point3d>(); hatchPoints.AddRange(leftPatrOfThreePoints); hatchPoints.AddRange(XThreeR.Polyline.Points.Reverse().ToList()); Polyline3d hatchContur = new Polyline3d(hatchPoints); //We will create on the basis of a contour a hatch (geometry) with continuous filling Hatch hatch = new Hatch(hatchContur, 0, 10, true); hatch.PattType = PatternType.PreDefined; hatch.PatternName = "SOLID"; //Based on the geometry of the hatch, we create the document object, set its color properties - green DbGeometry dbhatch = new DbGeometry(); dbhatch.Geometry = new EntityGeometry(hatch); dbhatch.DbEntity.Color = Color.Green; dbhatch.DbEntity.AddToCurrentDocument(); // if you want you can try to draw balls with circles use // DrawThreeBalls(_pntBase); //Similarly, make a Christmas tree toy (octagon) //red _bufPnt = _pntBase.Subtract(new Vector3d(30, 95, 0)); DbPolyline dbOctoRed = DrawThreeOctogonPl(_bufPnt);//implicit dbOctoRed.DbEntity.AddToCurrentDocument(); Hatch hatchCirkRed = new Hatch(dbOctoRed.Polyline, 0, 1, false); hatchCirkRed.PattType = PatternType.PreDefined; hatchCirkRed.PatternName = "SOLID"; DbGeometry dbhatchCirkRed = new DbGeometry(); dbhatchCirkRed.Geometry = new EntityGeometry(hatchCirkRed); dbhatchCirkRed.DbEntity.Color = Color.Red; dbhatchCirkRed.DbEntity.AddToCurrentDocument(); //green _bufPnt = _pntBase.Subtract(new Vector3d(-40, 200, 0)); DbPolyline dbOctoGreen = DrawThreeOctogonPl(_bufPnt);//implicit dbOctoGreen.DbEntity.AddToCurrentDocument(); Hatch hatchCirkGreen = new Hatch(dbOctoGreen.Polyline, 0, 1, false); hatchCirkGreen.PattType = PatternType.PreDefined; hatchCirkGreen.PatternName = "SOLID"; DbGeometry dbhatchCirkGreen = new DbGeometry(); dbhatchCirkGreen.Geometry = new EntityGeometry(hatchCirkGreen); dbhatchCirkGreen.DbEntity.Color = Color.LightSeaGreen; dbhatchCirkGreen.DbEntity.AddToCurrentDocument(); //blue _bufPnt = _pntBase.Subtract(new Vector3d(-12, 350, 0)); DbPolyline dbOctoBlue = DrawThreeOctogonPl(_bufPnt);//implicit dbOctoBlue.DbEntity.AddToCurrentDocument(); Hatch hatchCirkBlue = new Hatch(dbOctoBlue.Polyline, 0, 1, false); hatchCirkBlue.PattType = PatternType.PreDefined; hatchCirkBlue.PatternName = "SOLID"; DbGeometry dbhatchCirkBlue = new DbGeometry(); dbhatchCirkBlue.Geometry = new EntityGeometry(hatchCirkBlue); dbhatchCirkBlue.DbEntity.Color = Color.Blue; dbhatchCirkBlue.DbEntity.AddToCurrentDocument(); //display the text with congratulations MessageBox.Show("I Wish You A Merry Christmas And Happy New Year!"); } } public Polyline3d DrawThreeOctogonPl(Point3d _pntB) { //Create points for an octagon List<Point3d> octoPoints = new List<Point3d>() { new Point3d(_pntB.X, _pntB.Y, 0), new Point3d(_pntB.X-15, _pntB.Y, 0), new Point3d(_pntB.X-25, _pntB.Y-11.3, 0), new Point3d(_pntB.X-25, _pntB.Y-26.3, 0), new Point3d(_pntB.X-15, _pntB.Y-37.6, 0), new Point3d(_pntB.X, _pntB.Y-37.6, 0), new Point3d(_pntB.X+9.7, _pntB.Y-26.3, 0), new Point3d(_pntB.X+9.7, _pntB.Y-11.3, 0), new Point3d(_pntB.X, _pntB.Y, 0) }; return new Polyline3d(octoPoints); } } }
ããŒãIIIïŒVBã§ã®ã³ãŒãã®èšè¿°
Visual Studio 2015 for VB.NETã§ãããžã§ã¯ããäœæããããã»ã¹ã¯ãCïŒã®ãããžã§ã¯ããäœæããããã»ã¹ãšã»ãŒå®å šã«åãã§ãããå¿ èŠãªã¹ãã«ãæã£ãŠããªã人ã§ãèšäºãèªãããšãã§ããã®ã§ããã®ç¹ãããã«è©³ããåæããŸãã
ãŸããæ°ãããããžã§ã¯ããäœæããVB.NETã¯ã©ã¹ã©ã€ãã©ãªãéžæãã.NET Framework 3.5ïŒNC 8.XããŒãžã§ã³4.0çšïŒãéžæããŸã
次ã«ãå³åŽã®ããªã³ã¯ããã¿ã³ãå³ã¯ãªãã¯ããŠãNanoCADã®ãã¹ãŠã®ããŒãžã§ã³ã®SDKã§ã€ã³ã¹ããŒã«ããã©ã€ãã©ãªã«ãªã³ã¯ãè¿œå ããŸãã
ãã®ãããžã§ã¯ãã§ã¯ãmapimgdã ãã§ååã§ãïŒNC 8.5ã§ã¯mapibasetypesãå¿ èŠã§ãïŒã
ãŸããæšæºã®System.Windows.FormsãšSystem.DrawingãããŒãããå¿ èŠããããŸã
ãããŒã«ã«ã«ã³ããŒãããããã£ã®ãã§ãã¯ãå€ãããšãå¿ããªãã§ãã ãã
次ã«ãRMBã§ãããžã§ã¯ããã¯ãªãã¯ãããããããã£ããã¿ã³ãéžæããŠããããžã§ã¯ããèšå®ããŸã
ãããã°ã®äŸ¿å®äžããF5ãããŒãæŒããŠNanocadã®èµ·åãèšå®ããŸã
ïŒã³ãŒããå€æŽãããã³ã«ãNanocadãå®å šã«åèµ·åããå¿ èŠããããŸãïŒ
ã©ã€ãã©ãªãããŒãããã«ã¯ãNanoCADã³ã³ãœãŒã«ã§Netloadã³ãã³ããå ¥åããã³ã³ãã€ã«æžã¿ã®dllãéžæããŸãïŒéåžžã¯ãããžã§ã¯ããã©ã«ããŒã«ãããŸããããšãã°ãCïŒ\ Users \ b \ Dev \ habr \ XMTree \ XMTree \ bin \ DebugïŒã
æ¯åãããè¡ããªãããã«ãã¢ãã¬ã¹CïŒ\ ProgramData \ Nanosoft \ nanoCAD 5.1 \ DataRWïŒããã¯ç°ãªãå ŽåããããŸãïŒã«ç§»åãã次ã®å 容ã®load.configãã¡ã€ã«ãæ€çŽ¢ãŸãã¯äœæããŸãã
<root> <list> <module path="C:\Users\...\bin\Debug\ .dll"/> </list> </root>
ãã®åŸãããã°ã©ã ã®èµ·åæã«ã©ã€ãã©ãªãèªåçã«ããŒããããŸãã
ãã§ã«èšã£ãããã«ãVB.NETã«ã€ããŠã¯ãŸã£ããç¥ããŸããããCïŒãå°ãç¥ã£ãŠããŠãCïŒããVBãžã®ã³ãŒãã³ã³ããŒã¿ãŒã«ãã¹ãŠã®å€§ãŸããªäœæ¥ïŒããšãã°ã ãã ïŒãå®è¡ããããšãå¿ èŠãªã®ã¯ãå°ãä¿®æ£ããããšã ãã§ãã
å®å šãªã³ãã³ãã³ãŒããã¹ãã€ã©ãŒã®äžã«é 眮ãããããéšåçã«åæããŸãã
VB.NETäžã®NC 5.1ã®å®å
šãªã³ãŒã
Imports System.Collections.Generic Imports Multicad.Runtime Imports Multicad.DatabaseServices Imports Multicad.Geometry Imports Multicad.DatabaseServices.StandardObjects Imports System.Drawing Imports System.Windows.Forms Namespace XmasThree Class XmasThree <CommandMethod("DXThree", CommandFlags.NoCheck Or CommandFlags.NoPrefix)> Public Sub DrawXThree() Dim _pntBase As Point3d Dim _bufPnt As Point3d Dim jig As New InputJig() 'prompts for installation point entry Dim res As InputResult = jig.GetPoint("Select first point:") If res.Result = InputResult.ResultCode.Normal Then 'The base point is taken from the entry point (click with mouse) _pntBase = res.Point 'Draw the outline of the left half of the Christmas tree 'Create base points for the polyline Dim leftPatrOfThreePoints As New List(Of Point3d)() From { New Point3d(_pntBase.X, _pntBase.Y, 0), New Point3d(_pntBase.X - 125, _pntBase.Y - 154, 0), New Point3d(_pntBase.X - 31, _pntBase.Y - 137, 0), New Point3d(_pntBase.X - 181, _pntBase.Y - 287, 0), New Point3d(_pntBase.X - 31, _pntBase.Y - 253, 0), New Point3d(_pntBase.X - 242, _pntBase.Y - 400, 0), New Point3d(_pntBase.X - 37, _pntBase.Y - 400, 0), New Point3d(_pntBase.X - 37, _pntBase.Y - 454, 0), New Point3d(_pntBase.X, _pntBase.Y - 454, 0) } 'Create a polyline (geometry) Dim leftPatrOfThree As New Polyline3d(leftPatrOfThreePoints) 'Create a polyline object and place it on the drawing Dim XThreeLeft As New DbPolyline() XThreeLeft.Polyline = New Polyline3d(leftPatrOfThree) XThreeLeft.Polyline.SetClosed(False) XThreeLeft.DbEntity.Color = Color.Green XThreeLeft.DbEntity.AddToCurrentDocument() Dim XThreeRight As New DbPolyline() XThreeRight.DbEntity.Color = Color.Green XThreeRight.Polyline = DirectCast(XThreeLeft.Polyline.Mirror(New Plane3d(_pntBase, New Vector3d(10, 0, 0))), Polyline3d) XThreeRight.DbEntity.AddToCurrentDocument() 'From the right and left sides we make a single contour for hatching Dim XThreeR As New DbPolyline() XThreeR.DbEntity.Color = Color.Green XThreeR.Polyline = TryCast(XThreeRight.Polyline.GetCopy(), Polyline3d) XThreeR.DbEntity.AddToCurrentDocument() Dim hatchPoints As New List(Of Point3d)() hatchPoints.AddRange(leftPatrOfThreePoints) hatchPoints.AddRange(XThreeR.Polyline.Points.Reverse().ToList()) Dim hatchContur As New Polyline3d(hatchPoints) 'We will create on the basis of a contour a hatch (geometry) with continuous filling Dim hatch As New Hatch(hatchContur, 0, 10, True) hatch.PattType = PatternType.PreDefined hatch.PatternName = "SOLID" 'Based on the geometry of the hatch, we create the document object, set its color properties - green Dim dbhatch As New DbGeometry() dbhatch.Geometry = New EntityGeometry(hatch) dbhatch.DbEntity.Color = Color.Green dbhatch.DbEntity.AddToCurrentDocument() 'Similarly, make a Christmas tree toy (octagon) 'red _bufPnt = _pntBase.Subtract(New Vector3d(30, 95, 0)) Dim dbOctoRed As DbPolyline = DrawThreeOctogonPl(_bufPnt) dbOctoRed.DbEntity.AddToCurrentDocument() Dim hatchCirkRed As New Hatch(dbOctoRed.Polyline, 0, 1, False) hatchCirkRed.PattType = PatternType.PreDefined hatchCirkRed.PatternName = "SOLID" Dim dbhatchCirkRed As New DbGeometry() dbhatchCirkRed.Geometry = New EntityGeometry(hatchCirkRed) dbhatchCirkRed.DbEntity.Color = Color.Red dbhatchCirkRed.DbEntity.AddToCurrentDocument() 'green _bufPnt = _pntBase.Subtract(New Vector3d(-40, 200, 0)) Dim dbOctoGreen As DbPolyline = DrawThreeOctogonPl(_bufPnt) dbOctoGreen.DbEntity.AddToCurrentDocument() Dim hatchCirkGreen As New Hatch(dbOctoGreen.Polyline, 0, 1, False) hatchCirkGreen.PattType = PatternType.PreDefined hatchCirkGreen.PatternName = "SOLID" Dim dbhatchCirkGreen As New DbGeometry() dbhatchCirkGreen.Geometry = New EntityGeometry(hatchCirkGreen) dbhatchCirkGreen.DbEntity.Color = Color.LightSeaGreen dbhatchCirkGreen.DbEntity.AddToCurrentDocument() 'blue _bufPnt = _pntBase.Subtract(New Vector3d(-12, 350, 0)) Dim dbOctoBlue As DbPolyline = DrawThreeOctogonPl(_bufPnt) dbOctoBlue.DbEntity.AddToCurrentDocument() Dim hatchCirkBlue As New Hatch(dbOctoBlue.Polyline, 0, 1, False) hatchCirkBlue.PattType = PatternType.PreDefined hatchCirkBlue.PatternName = "SOLID" Dim dbhatchCirkBlue As New DbGeometry() dbhatchCirkBlue.Geometry = New EntityGeometry(hatchCirkBlue) dbhatchCirkBlue.DbEntity.Color = Color.Blue dbhatchCirkBlue.DbEntity.AddToCurrentDocument() MessageBox.Show("I Wish You A Merry Christmas And Happy New Year!!!") End If End Sub Public Function DrawThreeOctogonPl(_pntB As Point3d) As Polyline3d 'Create points for an octagon Dim octoPoints As New List(Of Point3d)() From { New Point3d(_pntB.X, _pntB.Y, 0), New Point3d(_pntB.X - 15, _pntB.Y, 0), New Point3d(_pntB.X - 25, _pntB.Y - 11.3, 0), New Point3d(_pntB.X - 25, _pntB.Y - 26.3, 0), New Point3d(_pntB.X - 15, _pntB.Y - 37.6, 0), New Point3d(_pntB.X, _pntB.Y - 37.6, 0), New Point3d(_pntB.X + 9.7, _pntB.Y - 26.3, 0), New Point3d(_pntB.X + 9.7, _pntB.Y - 11.3, 0), New Point3d(_pntB.X, _pntB.Y, 0) } Return New Polyline3d(octoPoints) End Function End Class End Namespace
ã³ãŒãã¯åçŽã§ããã念ã®ãããVBã®å Žåã¯ãããŸã§è¡ã£ãããšããªããããã³ãŒãã詳现ãã€éšåçã«åæããŸãã
Imports System.Collections.Generic Imports Multicad.Runtime Imports Multicad.DatabaseServices Imports Multicad.Geometry Imports Multicad.DatabaseServices.StandardObjects Imports System.Drawing Imports System.Windows.Forms
æç»çšã®MultiCAD.NET APIã©ã€ãã©ãªã®åå空éãããã³ãŠã£ã³ããŠã衚瀺ããŠãããã³ã°ã«è²ãå²ãåœãŠãWindowsã©ã€ãã©ãªãã€ã³ããŒãããŸãã
Namespace XmasThree Class XmasThree
åå空éãšã¯ã©ã¹åã®å®çŸ©
<CommandMethod("DXThree", CommandFlags.NoCheck Or CommandFlags.NoPrefix)> Public Sub DrawXThreeLeft()
Nanocadã®ã³ãã³ãã©ã€ã³ã«å ¥åããããŒã ãäœæããå®éã«ããªãŒãæç»ããŸãã
<CommandMethodïŒ "DXThree"> -NanocadããåŒã³åºãã³ãã³ãã®ååãä»»æã®ååãæå®ã§ããŸãããç°¡åã«èšãã°ãæ®ãã®ãã©ã°ã®ç®çã¯ããããŸããã
Public Sub DrawXThreeLeftïŒïŒ -ã³ãã³ãã®é¢æ°ïŒã¡ãœããïŒã®ååã¯ãCADãŠãŒã¶ãŒã«ã¯èŠããªãå éšããžãã¯ã§ãã
Dim _pntBase As Point3d Dim _bufPnt As Point3d
ã¯ãªã¹ãã¹ããªãŒã®è£ 食çšã®æ¿å ¥ãã€ã³ãã®åº§æšãšæ¿å ¥ãããã¡ãŒãã€ã³ãã®åº§æšãæ ŒçŽããããã«ãã¯ã©ã¹ãã£ãŒã«ãïŒå€æ°ïŒãäœæããŸãã
Dim jig As New InputJig() Dim res As InputResult = jig.GetPoint("Select first point:")
ã³ã³ãœãŒã«ãžã®å ¥åçšã«æ°ãããªããžã§ã¯ããäœæãããŠãŒã¶ãŒã«ç»é¢ãã¯ãªãã¯ããŠæ¿å ¥ãã€ã³ãã決å®ããããæåŸ ããŸãã
If res.Result = InputResult.ResultCode.Normal Then _pntBase = res.Point
å ¥åãæåãããšãã¯ãªã¹ãã¹ããªãŒãããã«æç»ããã倱æãããšäœãè¡ãããŸããã
Dim leftPatrOfThreePoints As New List(Of Point3d)() From { New Point3d(_pntBase.X, _pntBase.Y, 0), New Point3d(_pntBase.X - 125, _pntBase.Y - 154, 0), New Point3d(_pntBase.X - 31, _pntBase.Y - 137, 0), New Point3d(_pntBase.X - 181, _pntBase.Y - 287, 0), New Point3d(_pntBase.X - 31, _pntBase.Y - 253, 0), New Point3d(_pntBase.X - 242, _pntBase.Y - 400, 0), New Point3d(_pntBase.X - 37, _pntBase.Y - 400, 0), New Point3d(_pntBase.X - 37, _pntBase.Y - 454, 0), New Point3d(_pntBase.X, _pntBase.Y - 454, 0) }
ããªã©ã€ã³ã®é ç¹ãå®çŸ©ãããã€ã³ããæã€ãªã¹ããäœæããŸãïŒããªãŒã®å·ŠååïŒ
'Create a polyline (geometry) Dim leftPatrOfThree As New Polyline3d(leftPatrOfThreePoints) 'Create a polyline object and place it on the drawing Dim XThreeLeft As New DbPolyline() XThreeLeft.Polyline = New Polyline3d(leftPatrOfThree) XThreeLeft.Polyline.SetClosed(False) XThreeLeft.DbEntity.Color = Color.Green XThreeLeft.DbEntity.AddToCurrentDocument()
æåã«ãããªãŒã®å·Šååã®ãžãªã¡ããªïŒç»é¢ã«è¡šç€ºãããªãïŒãäœæãã次ã«ããã¥ã¡ã³ããªããžã§ã¯ããäœæããŸãããã®çµæã XThreeLeft.DbEntity.AddToCurrentDocumentïŒïŒã³ãã³ãã䜿çšããŠãå³é¢ã¢ãã«ç©ºéã«é 眮ããŸãã
Dim XThreeRight As New DbPolyline() XThreeRight.DbEntity.Color = Color.Green XThreeRight.Polyline = DirectCast(XThreeLeft.Polyline.Mirror(New Plane3d(_pntBase, New Vector3d(10, 0, 0))), Polyline3d) XThreeRight.DbEntity.AddToCurrentDocument()
ããªãŒã®å³ååãäœæããã«ã¯ãå·Šããã©ãŒãªã³ã°ããã ãã§ãïŒNanoCADèªäœã®ãã©ãŒãªã³ã°ã³ãã³ãã®ã¢ããã°ïŒã ãããè¡ãã«ã¯ãããªãŒã®å·Šååã®ããªã©ã€ã³ã§Mirrorã¡ãœãããåŒã³åºããDirectCastã³ãã³ãã䜿çšããŠãã¿ã€ããPolyline3dã«ãã£ã¹ãããããšãå¿ããªãã§ãã ããã
Dim XThreeRight As New DbPolyline() XThreeRight.DbEntity.Color = Color.Green XThreeRight.Polyline = DirectCast(XThreeLeft.Polyline.Mirror(New Plane3d(_pntBase, New Vector3d(10, 0, 0))), Polyline3d) XThreeRight.DbEntity.AddToCurrentDocument()
å¥åŠãªããšã«ãNC 5.1çšSDKã®MultiCAD.NET APIã®ãã«ãã§ã¯ãéåžžã®.NET APIã®ããã¥ã¡ã³ãã«ã¯ãããŸããããããã¯MultiCAD.NET APIã«å®è£ ãããŠããããã§ããããããåç §ã¯èŠã€ãããŸããã§ããããã®ãããå°ãªããšã以äžã®ã³ãŒãã¯ããŸãæ©èœããŸãã
Dim XThreeR As New DbPolyline() XThreeR.DbEntity.Color = Color.Green XThreeR.Polyline = TryCast(XThreeRight.Polyline.GetCopy(), Polyline3d) XThreeR.DbEntity.AddToCurrentDocument() Dim hatchPoints As New List(Of Point3d)() hatchPoints.AddRange(leftPatrOfThreePoints) hatchPoints.AddRange(XThreeR.Polyline.Points.Reverse().ToList()) Dim hatchContur As New Polyline3d(hatchPoints)
æåã«ãããªãŒã®å·Šååãšå³ååã®ç¹ãçµã¿åãããŠãç·ãæ£ããé åºã§éããããã«ããŸããå³ååã®é ç¹ã®é åã¯ãé ç¹ãéé ã«ãªãããã«ãè£è¿ããå¿ èŠããããŸãã
次ã«ãéåžžã®æ¹æ³ã§ããã€ã³ãã®ãªã¹ãã䜿çšããŠãããªã©ã€ã³ã®ãžãªã¡ããªãäœæããŸãã
ããã§ã¯ãã³ãŒãã¯å°ãåé·ã§ããèªåã§ããæ£ç¢ºã«æžãçŽãããšãã§ããŸã
'We will create on the basis of a contour a hatch (geometry) with continuous filling Dim hatch As New Hatch(hatchContur, 0, 10, True) hatch.PattType = PatternType.PreDefined hatch.PatternName = "SOLID"
ãã«ã¹ãã«ãŒã¹ã¢ãŠãã©ã€ã³ã䜿çšããŠããããã³ã°ã®ãžãªã¡ããªãäœæããŸãã ãããã³ã°ã®ã¿ã€ããšããŠãå¡ãã€ã¶ããéžæããŸãïŒãããã³ã°ã®ååã¯ãããããã³ã°ãã³ãã³ããéžæããããšã§Nanocadèªäœã«è¡šç€ºãããŸãïŒã
Dim dbhatch As New DbGeometry() dbhatch.Geometry = New EntityGeometry(hatch) dbhatch.DbEntity.Color = Color.Green dbhatch.DbEntity.AddToCurrentDocument()
次ã«ãç·ã«èšå®ããåŸãã¢ãã«ç©ºéã«é 眮ããæç»ãªããžã§ã¯ããäœæããŸãã
ã¯ãªã¹ãã¹ããªãŒã®é£ŸããæããŠãã ããã æåã¯ããŒã«ã«é°åœ±ãä»ããããšãæ³å®ããŠããŸããããéçºè ãã©ãŒã©ã ããåããããã³ã°ããã¢ããã€ã¹ã¯ãCïŒããŒãžã§ã³ã®ã³ãŒããšNC 5.1ã§ã®ã¿æå¹ã§ããããã8è§åœ¢ã«ãããã³ã°ããŸãã
'Similarly, make a Christmas tree toy (octagon) 'red _bufPnt = _pntBase.Subtract(New Vector3d(30, 95, 0)) Dim dbOctoRed As DbPolyline = DrawThreeOctogonPl(_bufPnt) dbOctoRed.DbEntity.AddToCurrentDocument() Dim hatchCirkRed As New Hatch(dbOctoRed.Polyline, 0, 1, False) hatchCirkRed.PattType = PatternType.PreDefined hatchCirkRed.PatternName = "SOLID" Dim dbhatchCirkRed As New DbGeometry() dbhatchCirkRed.Geometry = New EntityGeometry(hatchCirkRed) dbhatchCirkRed.DbEntity.Color = Color.Red dbhatchCirkRed.DbEntity.AddToCurrentDocument()
ããã»ã¹å šäœã¯ä»¥åã«è¡ã£ããã®ãšåãã§ããå¯äžã®éãã¯ãã³ãŒãã®éãæžããããã«ãåå¥ã®ã¡ãœããDrawThreeOctogonPlã§å «è§åœ¢ã®ããªã©ã€ã³ãå°ãäœæããããšã§ãã
ãã®ãããªãããŒã«ãã¯3ã€ïŒèµ€ãç·ãéïŒãããŸãããããããå¥ã ã«åããã®ã¯æå³ããªããšæããŸãã
æåŸã«æ®ã£ãŠããã®ã¯ããç¥ãã®ãŠã£ã³ããŠã衚瀺ããããšã§ãã
MessageBox.Show("I Wish You a Merry Christmas and Happy New Year!!!") End If End Sub
ãã®çµæã次ã®å³ãåŸãããŸãã
NC 5.1ã®å Žå
NC 8.1ã®å Žå
ããŒãIVïŒæ¥ãŠïŒ
ããããã誰ããç§ãã¡ãä»ã§ã¯åœ¹ã«ç«ããªãããããŠåœ¹ã«ç«ããªããã§ããããããããšèšãã§ããã...
ãŸããããã¯åå¿è åãã®å¥ã®èšäºã§ãããHabréã«ã¯æ²èŒãããŠããŸããã
ããããåŠæ ¡ã§åœŒããããã°ã©ãã³ã°ã«ã€ããŠãã¹ãŠæããããšãããšããã«ã³ã¬ã«ãŒã®å©ããåããŠäœããæããšããæãç°¡åãªã¿ã¹ã¯ããå§ãããã®åŸããŒã·ãã¯ã®åºç€ãäžããŸããïŒåœæã¯ãã§ã«å€ãè¯ããã¹ã«ã«ã奜ãã§ãããïŒãã¯ããåºæ¬ããŒãã®ããªãšãŒã·ã§ã³ãé ãããšã¯ãå°ãªããšãåãSmallBasic ãããã°ã©ã ããæ¹æ³ã人ã ã«æããããšãã§ããæ¹æ³ã®1ã€ã§ãã
ãããã£ãŠãNC 5.1ã¯ããããç®çã§å®å šã«ç¡æã§ãããããNanoCADã®æè²çã®ã©ã€ã»ã³ã¹ãååŸã§ããŸãæ©é¢ã¯ããã®åŸãç§ã¯é«æ ¡ãšäžçè·æ¥æè²ã®æè²æ©é¢ã¯éåžžã«ããNanokadãšç°¡åãªäŸãèŠãŠã©ã®ããã«ããã°ã©ã CADã«åäŸãã¡ã«èª¬æããããšãã§ãããšæãã
å ¬æ£ã§ã¯NCãåŠæ ¡ã§äœ¿ããããã§ãå¯äžã®CADãœãããŠã§ã¢ã§ã¯ãªãããšã«çæãã¹ãã§ãããšãããAPIãéããŠãããããªãã¯ç¢ºãã«åãã«åããããšãã§ããŸããããã³ã³ãã¹ã
ãããã«ãããç§ã¯ããªãã«ãã¹ãŠã®å¹žããšæåãç¥ã£ãŠæ¥ãŠ2018幎ïŒ
ãããŠ2018幎ã«ãéçºè ãæ°ããAPIãšæ°ããNET FrameworkãåããNanoCADã®ç¡æçã®éåžžã®ã¢ããããŒããæäŸããŠãããããšãé¡ã£ãŠããŸãã
PSéèŠïŒå¥ã®èšäºãå²ããªãããã«ã念ã®ããã«ãç§ãšåãããã«Nanocad 8.Xã®APIãéžãã§ãã人ã ã«èŠåããŸãã
å人çã«ã¯ãææ°ã®Windows 10æŽæ°ããã°ã©ã ã64ãããããŒãžã§ã³ã®NanoCADã«ã€ã³ã¹ããŒã«ããåŸãããªã©ã€ã³ã倱æãå§ããŸããïŒé«ããæ£ããèšå®ãããŠããŸããïŒããããŠã以åã«èšè¿°ããããã¹ãŠã®CïŒã³ãã³ãã¯ããäžã«åãã£ãŠãè¡ããŸãã
32ãããããŒãžã§ã³ã§ã¯ããã¹ãŠãæ£åžžã«æ©èœããŸãããã®åé¡ã®è§£æ±ºçã¯ãŸã èŠã€ãã£ãŠããªãã®ã§ãWindows 10ãæŽæ°ããåã«ããããéèŠãªå Žåã¯æ³šæããŠãã ããã