Continue to Site

Welcome to MCAD Central

Join our MCAD Central community forums, the largest resource for MCAD (Mechanical Computer-Aided Design) professionals, including files, forums, jobs, articles, calendar, and more.

How to get/set dwg dimension’s font

_TL_

New member
Hello everybody,
please can you help me how to get by Pro/Toolkit font name of a drawing dimension? And how to set it? I can do it manually, but I can't find any appropriate Pro/Toolikit function.

Thank you
 
_TL_,


It will take you some digging to get the proper handle to call this function but I think you can do it with ProDtlnotetextFontGet. I am pretty sure that dimensions shown on drawings are detail entities but you have to get down to a ProDtlnotetext object to do it. Good luck!
 
Hello williaps, thank you for your reply, but I am to able to find how to do it. I cannot find any function or sequence of functions for getting ProDtlnotetext from ProDimension. And when I try to overcast ProDimension to ProNote and call ProDtlnoteDataGet a recieve the PRO_TK_BAD_INPUTS error.
 
I'm not so sure you can get/set the text style of dimensions unless you're using Wildfire 3. In WF2 there are a couple of functions to get the dimension text ProDimensionTextGet and ProDimensionSymtextGet but they return ProLine arrays. I don't see how you can map those to notes because they're essentially just wchar_t arrays. Maybe there's another indirect way - I would call PTC if I were you.


In Wildfire 3 they've got a couple of new functions: ProDimensionTextstyleSet and ProDimensionTextstyleGet. I haven't tried them out but that makes me think that it probably couldn't be done previous to WF3. They require the Pro/TOOLKIT for 3D Drawings license so maybe they're just for the model dims, not drawing. Like I said before - you're better off contacting PTC and asking them at this point.
 
I got response from PTC quite fast, but they say it is not possible :(

In Wildfire 3 ProDimensionTextstyleGet can really read information such as thickness, undlerline, slant etc. but I don't see any function for extracting font's name.
 
Hi.
Does anybody know how to collect all the dimensions in
drawing/view and how to assign a handle to it?Is it
possible with ProDrawingDtlEntitiesCollect()?
 
use drawing dimension visit APi in action method of it sort each dimension according to the view they are linked to.
 
Hi.Thanks for the reply.
I tried using -
ProDrawingDimensionVisit(drawing,PRO_DIMENSION,
(ProDimensionVisitAction)VisitDimension,NULL,
(ProAppData)&p_data)

But here,stuckup with what data has to be passed in &p_data
to the action function?
Edited by: hijacker
 
Typecast it with any of data structure you wish to use.
ProAppData is actually is void * it would be typecasted to any of data types.
 

Sponsor

Articles From 3DCAD World

Back
Top