- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
I'd like to create DimData (AcDbDimDataPtrArray) in my jig and my custom entity. I was able to reproduce the correct behaviour (like AutoCAD polyline), but it seems I have not initializing correctly the style of the dimension, because the result is not identical (look at the two pictures).
AutoCAD PLINE jig (during pan)
My jig (during pan) - "errors" in red circle
Here is what I did:
I overrided the two following methods in my Jig (AcedJig) to provide DimData:
virtual AcDbDimDataPtrArray * dimData(const double dimScale); virtual Acad::ErrorStatus setDimValue(const AcDbDimData * pDimData, const double dimValue);
In the first method, I create a simple AlignedDimension like this:
... AcDbAlignedDimension * pDimension = new AcDbAlignedDimension; pDimension->setDatabaseDefaults(); pDimension->setNormal(m_pEntity->normal()); pDimension->setElevation(m_pEntity->elevation()); pDimension->setDimscale(dimScale); pDimension->setHorizontalRotation(0.); AcDbDimData * pDimData = new AcDbDimData(pDimension); pDimData->setDimFocal(true); pDimData->setDimHideIfValueIsZero(true); pDimData->setDimEditable(true); m_dimData.append(pDimData); return &m_dimData;
Maybe I need to call setDimensionStyle? But which style to use? I did not find any example in the Object ARX, any suggestions are welcomed.
Regards,
Jonathan
Jonathan
Solved! Go to Solution.