Hi,
I created a simple entity derived from AcDbText and my goal is to provide different hatch boudaries to the "hatching process" instead of the standard background mask of a text. Like for other custom entities, I implemented the subExplode function to define hatch boudaries but it doesn't work. This function don't seem to be called by "hatching process".
I know that a trick would be to have a AcDbText embedded in a "simple entity", but I don't want this solution because I need all defined functions of AcDbText.
If there is no solution, can we at least tell AutoCAD to ignore certain texts for hatching?
Any suggestions?
Regards,
Hi,
I created a simple entity derived from AcDbText and my goal is to provide different hatch boudaries to the "hatching process" instead of the standard background mask of a text. Like for other custom entities, I implemented the subExplode function to define hatch boudaries but it doesn't work. This function don't seem to be called by "hatching process".
I know that a trick would be to have a AcDbText embedded in a "simple entity", but I don't want this solution because I need all defined functions of AcDbText.
If there is no solution, can we at least tell AutoCAD to ignore certain texts for hatching?
Any suggestions?
Regards,
Hi ,
I want to confirm if I understood your query correctly , are you trying to change the hatch pattern on text entity while your custom text entity getting drawn ?
Can you please clarify "Change hatch boundary of text entity " ?
Hi ,
I want to confirm if I understood your query correctly , are you trying to change the hatch pattern on text entity while your custom text entity getting drawn ?
Can you please clarify "Change hatch boundary of text entity " ?
Sorry if I was not clear enough. This time, I will try with a picture
What I want:
How to tell AutoCAD that the "boundaries" of my entity (derived from AcDbText) are an ellipse or a square or ... when user uses hatch command?
Regards,
Sorry if I was not clear enough. This time, I will try with a picture
What I want:
How to tell AutoCAD that the "boundaries" of my entity (derived from AcDbText) are an ellipse or a square or ... when user uses hatch command?
Regards,
I don't think it is possible , from API perspective we don't have control over this , while Hatching ,it definitely detects from Text and appends TextBox to hatchloop , but we can't modify the textbox 😞
One thing I noticed , if you draw a ellipse enveloping text entity , hatch process does hit subexplode of text entity.
I don't think it is possible , from API perspective we don't have control over this , while Hatching ,it definitely detects from Text and appends TextBox to hatchloop , but we can't modify the textbox 😞
One thing I noticed , if you draw a ellipse enveloping text entity , hatch process does hit subexplode of text entity.
I implemented the subExplode function - post your code. mb this will help
imho, possible variants:
1. somethig wrong with your subExplode
2. mb it's impossible for acdbtext to do what you want. so, you need to use another base class, for example, polyline and embed your acdbtext as a variable of that class
anyway, for my custom object (acdbpolyline) it works.
my subExplode code:
Acad::ErrorStatus CAcDbChain::subExplode(AcDbVoidPtrArray & entitySet) const { assertReadEnabled(); for(int i = 0; i < mEntities.length(); i++) { AcDbEntity* clonedEntity = (AcDbEntity*)mEntities[i]->clone(); if(clonedEntity) entitySet.append(clonedEntity); } return Acad::eOk; }
CAcDbChain - public AcDbPolyline
mEntities - an array of non database entities drawn instead of base polyline
I implemented the subExplode function - post your code. mb this will help
imho, possible variants:
1. somethig wrong with your subExplode
2. mb it's impossible for acdbtext to do what you want. so, you need to use another base class, for example, polyline and embed your acdbtext as a variable of that class
anyway, for my custom object (acdbpolyline) it works.
my subExplode code:
Acad::ErrorStatus CAcDbChain::subExplode(AcDbVoidPtrArray & entitySet) const { assertReadEnabled(); for(int i = 0; i < mEntities.length(); i++) { AcDbEntity* clonedEntity = (AcDbEntity*)mEntities[i]->clone(); if(clonedEntity) entitySet.append(clonedEntity); } return Acad::eOk; }
CAcDbChain - public AcDbPolyline
mEntities - an array of non database entities drawn instead of base polyline
Can't find what you're looking for? Ask the community or share your knowledge.