progeCAD support, tips and troubleshooting forum. progeCAD works very similar to some versions of AutoCAD. Moderated.

Moderators: caddit, Moderators

#1392 by John in Sweden
Wed Dec 08, 2010 9:26 am
I am trying to automate the process of creating, inserting and editing the attribute information of blocks in ProgeCAD 2010 using the ProgeCAD Object Library in C# (Visual C# express IDE). I can create the blocks OK - and insert them using coordinates set in script i.e.

IntelliCAD.Library library = application.Library;
IntelliCAD.Point insertPoint = library.CreatePoint(x1, y1, z1)

...but I would like to be able to select the insert point in the drawing using my crosshairs (and esnap function for example).

Can anyone help with this?

#1395 by John in Sweden
Thu Dec 09, 2010 12:07 pm
Thanks for the reply!

When I try this I get an error message:-

Error 1 The type or namespace name 'ActiveDocument' does not exist in the namespace 'IntelliCAD' (are you missing an assembly reference?)

I am using the following references:-

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using IntelliCAD;
using System.Runtime.InteropServices;


Am I missing a reference?

#1396 by John in Sweden
Thu Dec 09, 2010 12:31 pm
I've got it!!!

pt = application.ActiveDocument.Utility.GetPoint();

Many thanks for your help!