CAD/CAM discussion forum > CAD > ZcadUtility
    
  Subscribe Topic

Rank: 1

rishi2013

Newbie

posts: 2

Registered: 2013-1-11

Message 1 of 3

 ZcadUtility
11-01-2013 12:59 . pm   |   View his/her posts only
Post Last Edit by rishir7113 at 2013-1-11 17:02

Post Last Edit by rishir7113 at 2013-1-11 14:08

Hi Folks

I try to evaluate ZWCAD+ with com in VS2008.I added Type library and try to Run Some sample Application Like AddLine,AddCircle, etc and these works fine.


Follow to that i tried to use GetPoint,SelectbyFence Which is giving me error that Interface is Not registered (Interop.ZWCAD)

I am Facing below issues,
In programming ZcadDocument.ZcadUtility Throws Exception For Me.
Even ZcadDocument.SelectionSet do the same.

I am using ZWCAD+ Trial version on Windows XP operating System.

Kindly Let me know the reason or solution for it.

Sample Code is As Below


ZcadApplication zcadapp;
ZcadDocument zcaddoc;
ZcadUtility zUtility;


zcadapp = new ZcadApplication();
zcadapp.Visible = true;
zcaddoc = zcadapp.ActiveDocument;






object objPoint = (object)dblStartPoint;
string strPrompt = "Click a Point";
object objPrompt = (object)strPrompt;
object retObj;
zUtility = zcaddoc.Utility;


try
{

retObj = zUtility.GetPoint(objPoint, objPrompt); // Error Here As zUtility is null




double[] dblStartPoint = new double[3];


dblStartPoint = (double[])retObj;

}
catch
{

// Error ......

}


Thanks
Rishikesh

Rank: 1

Assgarth

Newbie

posts: 26

Registered: 2011-7-29

Message 2 of 3

11-01-2013 04:47 . pm   |   View his/her posts only
Post Last Edit by Zibster at 2013-1-11 16:56

Hi,

can you add (attach) you code here?

Greetings,
Assgarth

Rank: 1

rishi2013

Newbie

posts: 2

Registered: 2013-1-11

Message 3 of 3

11-01-2013 05:04 . pm   |   View his/her posts only
Reply 2# Zibster


Hi Zibster
I added Sample Code with My earlier Post.


Regards
Rishikesh
See also
X