Use of CADGroup Object example?
Moderators: SDS, support, admin
-
- Posts: 4
- Joined: 22 Aug 2007, 17:56
- Location: USA
- Contact:
Use of CADGroup Object example?
Using the CAD Import .NET (pro/extended) library in C#...
Could I see a breif example on the proper use of the CADGroup object?
I have attempted adding entities to the group and the group to the converter - but the entities do not display within the drawing?
Could I see a breif example on the proper use of the CADGroup object?
I have attempted adding entities to the group and the group to the converter - but the entities do not display within the drawing?
Hello!
<b>CADGroup</b> is not a visual object. That is why added entities could not be displayed.
We recommend to use classes <b>CADBlock</b> and <b>CADInsert</b>. Do you need an example?
Sergey.
Please post questions to the forum or write to support@cadsofttools.com
<b>CADGroup</b> is not a visual object. That is why added entities could not be displayed.
We recommend to use classes <b>CADBlock</b> and <b>CADInsert</b>. Do you need an example?
Sergey.
Please post questions to the forum or write to support@cadsofttools.com
-
- Posts: 4
- Joined: 22 Aug 2007, 17:56
- Location: USA
- Contact:
Yes please.
When testing the groups - we also tried the CADBlock objects without success. We are obviously not setting-up/using the Block object correctly as the results with this object were the same as with the group. We did not attempt to use the CADInsert object yet.
Examples of both/or either the Block and Insert would be very beneficial.
Thanks in advance,
Scott M.
When testing the groups - we also tried the CADBlock objects without success. We are obviously not setting-up/using the Block object correctly as the results with this object were the same as with the group. We did not attempt to use the CADInsert object yet.
Examples of both/or either the Block and Insert would be very beneficial.
Thanks in advance,
Scott M.
Hello Scott,
Please try the following code:
Sergey.
Please post questions to the forum or write to support@cadsofttools.com
Please try the following code:
Code: Select all
<font color="green">//add line</font id="green">
CADLine ln1 = <font color="blue">new</font id="blue"> CADLine();
ln1.Color = Color.Red;
ln1.Point = <font color="blue">new</font id="blue"> DPoint(10, 10, 0);
ln1.Point1 = <font color="blue">new</font id="blue"> DPoint(20, 20, 0);
ln1.Loaded(this.FCADImage.Converter);
<font color="blue">this</font id="blue">.FCADImage.Converter.OnCreate(ln1);
<font color="green">//add attdef</font id="green">
CADAttrib entAttrib = <font color="blue">new</font id="blue"> CADAttrib();
entAttrib.Tag = "Tag Faska";
entAttrib.Text = "Text Bolt";
<font color="blue">this</font id="blue">.FCADImage.Converter.Loads(entAttrib);
<font color="green">//add block</font id="green">
CADBlock bl1 = <font color="blue">new</font id="blue"> CADBlock();
bl1.Name = "MyBlock";
bl1.Color = Color.Red;
bl1.Visibility = <font color="blue">true</font id="blue">;
bl1.AddEntity(ln1);
<font color="blue">this</font id="blue">.FCADImage.Converter.Blocks.Add(bl1);
<font color="blue">this</font id="blue">.FCADImage.Converter.OnCreate(bl1);
<font color="blue">this</font id="blue">.FCADImage.Converter.Loads(bl1);
<font color="green">//add insert</font id="green">
CADInsert ins1 = <font color="blue">new</font id="blue"> CADInsert();
ins1.Angle = 130;
ins1.Block = bl1;
ins1.Point = <font color="blue">new</font id="blue"> DPoint(10, 10, 0);
ins1.Visibility = <font color="blue">true</font id="blue">;
ins1.AddEntity(entAttrib);
<font color="blue">this</font id="blue">.FCADImage.Converter.Entities.Add(ins1);
<font color="blue">this</font id="blue">.FCADImage.Converter.OnCreate(ins1);
<font color="blue">this</font id="blue">.FCADImage.Converter.Loads(ins1);
<font color="blue">this</font id="blue">.cadPictBox.Invalidate();
Please post questions to the forum or write to support@cadsofttools.com
-
- Posts: 4
- Joined: 22 Aug 2007, 17:56
- Location: USA
- Contact: