Page 1 of 1

AutoCad Variables

Posted: 04 Dec 2009, 23:26
by aby
Hi,

What is the equivalent Variable names in CadSoft Lib.

DIMDLE

DIMTAD I want to set Text above the dimension line.

Thanks

Aby

Re: AutoCad Variables

Posted: 07 Dec 2009, 16:38
by support
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.

Re: AutoCad Variables

Posted: 09 Dec 2009, 00:51
by aby
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);

Re: AutoCad Variables

Posted: 09 Dec 2009, 14:18
by support
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.

Re: AutoCad Variables

Posted: 09 Dec 2009, 16:23
by aby
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

Re: AutoCad Variables

Posted: 09 Dec 2009, 17:13
by support
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.

Re: AutoCad Variables

Posted: 09 Dec 2009, 18:26
by aby
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

Re: AutoCad Variables

Posted: 10 Dec 2009, 10:48
by support
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.

Re: AutoCad Variables

Posted: 10 Dec 2009, 22:36
by aby
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

Re: AutoCad Variables

Posted: 11 Dec 2009, 12:05
by support
Dear Aby.
Thank you for participation in the forum. I will try to give more informative answers.

Alexander.