AutoCad Variables

If you have any comments or questions about our developing tools, please do not hesitate to contact us at this forum

Moderators: admin, SDS, support

AutoCad Variables

Postby aby » 04 Dec 2009, 21:26

Hi,

What is the equivalent Variable names in CadSoft Lib.

DIMDLE

DIMTAD I want to set Text above the dimension line.

Thanks

Aby
aby
 
Posts: 81
Joined: 21 May 2007, 10:02
Location: Turkey

Re: AutoCad Variables

Postby support » 07 Dec 2009, 14:38

Hello.
TextPosVert name in CAD Import VCL is equivalent to DIMTAD name of AutoCAD. Unfortunately, DIMDLE AutoCAD variable doesn't have equivalent in CAD Import VCL. We plan to add it into our library soon.

Alexander.
Please post questions to the forum or write to support@cadsofttools.com
support
 
Posts: 2226
Joined: 30 Mar 2005, 08:36
Location: Russia

Re: AutoCad Variables

Postby aby » 08 Dec 2009, 22:51

Dear Solodnikov,

I've already found this property and test it. Does not work for me.

Here is the code. Could you test it on Delphi side.

Thanks
Aby


Code: Select all
        TsgDXFDimension *sgDms = new  TsgDXFDimension;
        sgDms->Flags = 0;
        sgDms->LinDefPoint1 = MakeFPoint(0,0,0);
        sgDms->LinDefPoint2 = MakeFPoint(100,0,0);
        sgDms->DefPoint = MakeFPoint(100,-25,0);
        sgDms->MiddlePoint = MakeFPoint(50,-25,0);

//        sgDms->Style = ProDim->Style;
//        sgDms->TextStyle = ProDim->TextStyle;
        sgDms->ArrowType1 = 5;
        sgDms->ArrowType2 = 5;
        sgDms->ArrowSize = 6;
        sgDms->TextHeight = 12.5;
        sgDms->Precision = 0;
        sgDms->ExtLineOffset = 4;
        sgDms->ExtLineExt = 4;
        sgDms->TextPosVert = 3;  //  This line was already given before your post
        sgDms->Layer = ProDim->Layer;
        FCADImage->CurrentLayout->AddEntity(sgDms);
        FCADImage->Converter->Loads(sgDms);
        FCADImage->RefreshCurrentLayout();
        FCADImage->GetExtents();
        TGraphic *vGr =(FDwgNavigator->Picture->Graphic);
        int vWidth = vGr->Width;
        int vHeight = vGr->Height;
        double vRatio = (vHeight) ? (double)vWidth / vHeight : 1.0;
        if (vRatio <= 1.0) {
                vHeight = Screen->Height;
                vWidth = Ceil(vHeight * vRatio);
        } else {
                vWidth = Screen->Width;
                vHeight = Ceil(vWidth / vRatio);
        }
        TsgCADtoDXF *ExpCadFile(new TsgCADtoDXF( dynamic_cast<TsgDXFImage *> (vGr)));
        ExpCadFile->SaveToFile(FResFileName);
aby
 
Posts: 81
Joined: 21 May 2007, 10:02
Location: Turkey

Re: AutoCad Variables

Postby support » 09 Dec 2009, 12:18

Hello.
TextPosVert works ok even for BCB. Please specify why you decided the opposite? And that is your expectation from
Code: Select all
sgDms->TextPosVert = 3;

Alexander.
Please post questions to the forum or write to support@cadsofttools.com
support
 
Posts: 2226
Joined: 30 Mar 2005, 08:36
Location: Russia

Re: AutoCad Variables

Postby aby » 09 Dec 2009, 14:23

Alexander,

Did you get my suplement mail?

In this mail the dimension text appers between the dimension lines.

I want to draw the dimension text above the dimension line.

It seems it couldn't do.

sgDms->TextPosVert = 3;

It makes no difference If you suply this line or not . Should I have to set another property to get this effect.

Thanks

Sabetay
aby
 
Posts: 81
Joined: 21 May 2007, 10:02
Location: Turkey

Re: AutoCad Variables

Postby support » 09 Dec 2009, 15:13

But the dimension text located above the dimension line if TextPosVert = 1, not 3. What is why I asked about sgDms->TextPosVert = 3. In which source you found setting TextPosVert = 3 for setting dimension text location above the dimension line?

Alexander.
Please post questions to the forum or write to support@cadsofttools.com
support
 
Posts: 2226
Joined: 30 Mar 2005, 08:36
Location: Russia

Re: AutoCad Variables

Postby aby » 09 Dec 2009, 16:26

Mr Solodnikov,

Your reply to my post was "TextPosVert name in CAD Import VCL is equivalent to DIMTAD name of AutoCAD."

There was no information about what the property value must be.

Although TextPosVert type is TsgDimTextPosVert, there is no information about what this type is in your documentation.

I've wrongly guessed and treated that this type is an integer. if I supply the value 3, it would draw the text 3 units above the text line,
like in AutoCad when you change DIMTAD variable- as units -.

In your reply when you state that the value of the property should have to be 1, I've searched this type and found it in .hpp. file. It should have to be like the following.

enum TsgDimTextPosVert { pvCenter, pvAbove, pvOutSide, pvJIS };

If you could suply the above information in your documentation or when I ask the question if you had replied

sgDms->TextPosVert = pvAbove;

with this line simply there would be no need for further discussions.

Thanks

Aby
aby
 
Posts: 81
Joined: 21 May 2007, 10:02
Location: Turkey

Re: AutoCad Variables

Postby support » 10 Dec 2009, 08:48

Hello Aby.
Your reply to my post was "TextPosVert name in CAD Import VCL is equivalent to DIMTAD name of AutoCAD."
There was no information about what the property value must be.
I've wrongly guessed and treated that this type is an integer."
Currently you don't need any information from us if you use BCB. It's not necessary to use enumeration in BCB for current library version, you can just set this property as integer. It corresponds to AutoCAD DIMTAD integer values. However, using of enumeration types is more correct way. If our TsgDimTextPosVert enumeration will be changed in the future versions and it won't correspond to AutoCAD type, we will note this fact in our library.

if I supply the value 3, it would draw the text 3 units above the text line,
like in AutoCad when you change DIMTAD variable- as units -.
No, that's not correct. AutoCAD DIMTAD doesn't set neither units above the text line no any units. There is the DIMGAP in AutoCAD for such purpose. Our lib have equivalent TextOffset property.

So, I think you will agree what I have reasons to ask about your information source. And we don't need to include any additional description, because our properties are equivalent to AutoCAD.

Alexander.
Please post questions to the forum or write to support@cadsofttools.com
support
 
Posts: 2226
Joined: 30 Mar 2005, 08:36
Location: Russia

Re: AutoCad Variables

Postby aby » 10 Dec 2009, 20:36

Dear Alexander,

Humanum est err. I've stated that I err.

I'm not going to discuss if I'm right or wrong.

This does not lead us to anywhere.

My problem is solved. Thanks

Aby
aby
 
Posts: 81
Joined: 21 May 2007, 10:02
Location: Turkey

Re: AutoCad Variables

Postby support » 11 Dec 2009, 10:05

Dear Aby.
Thank you for participation in the forum. I will try to give more informative answers.

Alexander.
Please post questions to the forum or write to support@cadsofttools.com
support
 
Posts: 2226
Joined: 30 Mar 2005, 08:36
Location: Russia


Return to CADImportVCL + DXFExportVCL

Who is online

Users browsing this forum: No registered users and 0 guests

cron