Jump to content

Recommended Posts

Posted

Morning All,

 

I need help to create a new point style so i can use it as a single point or multipoint for when i bring in x-y coordinates.

 

Or if i create a block how can i use it as a multipoint for x-y coordinates?

 

Thanks

Posted

Check your AutoCAD Help file. The topic will be Create Point Objects (.NET).

Posted

Thanks Mark,

 

Ive come across this

 

using Autodesk.AutoCAD.Runtime;using Autodesk.AutoCAD.ApplicationServices;using Autodesk.AutoCAD.DatabaseServices;using Autodesk.AutoCAD.Geometry; [CommandMethod("AddPointAndSetPointStyle")]public static void AddPointAndSetPointStyle(){ // Get the current document and database Document acDoc = Application.DocumentManager.MdiActiveDocument; Database acCurDb = acDoc.Database; // Start a transaction using (Transaction acTrans = acCurDb.TransactionManager.StartTransaction()) { // Open the Block table for read BlockTable acBlkTbl; acBlkTbl = acTrans.GetObject(acCurDb.BlockTableId, OpenMode.ForRead) as BlockTable; // Open the Block table record Model space for write BlockTableRecord acBlkTblRec; acBlkTblRec = acTrans.GetObject(acBlkTbl[blockTableRecord.ModelSpace], OpenMode.ForWrite) as BlockTableRecord; // Create a point at (4, 3, 0) in Model space DBPoint acPoint = new DBPoint(new Point3d(4, 3, 0)); acPoint.SetDatabaseDefaults(); // Add the new object to the block table record and the transaction acBlkTblRec.AppendEntity(acPoint); acTrans.AddNewlyCreatedDBObject(acPoint, true); // Set the style for all point objects in the drawing acCurDb.Pdmode = 34; acCurDb.Pdsize = 1; // Save the new object to the database acTrans.Commit(); }} need abit of help on this

Posted

Also could i use a block I've already created as a multipoint for when i bring in x-y coordinates from excel?

Posted

Mentioning that you read the referenced material would have sufficed.

 

Just what is a multipoint block?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...