Author Topic: Class to Block Reference  (Read 1241 times)

0 Members and 1 Guest are viewing this topic.

shers

  • Guest
Class to Block Reference
« on: May 19, 2015, 02:17:04 AM »
Hi,

I have a class called Class1 that inserts a drawing to the current drawing as a block. I also have a method in another class called Class2 that calls the Insertion Block from the Class2. If I call this method from another method in Class2, what will be the return type? Confused? Here is a sample code.

Class1:

public void Insert(...)
{
   .........
}

Class2:

private Class1 Method1()
{
   ....
   Class1 insBk = new Class1();
   insBk.Insert(...);
   return insBk;
}

private void Method2(..)
{
   Class1 cls1 = Method1(...);
}

What will this return? May be a dumb question. But can I change it to a block reference?

Thanks

kpblc

  • Bull Frog
  • Posts: 396
Re: Class to Block Reference
« Reply #1 on: May 19, 2015, 02:27:10 AM »
Why do you use void at Class1? Perhaps you have to change return type of Insert method to BlockReference?
Sorry for my English.