How to set correct symbol height using JLink or Toolkit?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
How to set correct symbol height using JLink or Toolkit?
~hi all,
I am having trouble getting the correct transformation for sizing a drawing symbol programmatically using JLink. I'll try and explaing what's happening...
I have a drawing with a 1:1 scale view on it. I am prompting the user for a symbol height to apply to a libraried symbol before retrieving it and placing it on the drawing. The symbol's as-created (default) size is 0.50" height x 3.00" width. But let's say the user wants to place the symbol with a 1.00" height? I know I have to transform the real height to a screen height but not sure what that process is.
I am using:
Drawing drw;
//retrieve the drawing object
symDef = drw.RetrieveSymbolDefinition ("mysymbol", null, null, null);
DetailSymbolInstInstructions instrs = pfcDetail.DetailSymbolInstInstructions_Create (symDef);
instrs.SetHeight(d);
drw.CreateDetailItem (instrs);
Obviously (d) in the SetHeight can't be the real 1.00" -- so how do I get the screen size?
I get close usingdrw.GetSheetTransform(1); and manipulating but never exact...
Can anyone shed some light on this for me or point in the right directions?
tia
_mark
This thread is inactive and closed by the PTC Community Management Team. If you would like to provide a reply and re-open this thread, please notify the moderator and reference the thread. You may also use "Start a topic" button to ask a new question. Please be sure to include what version of the PTC product you are using so another community member knowledgeable about your version may be able to assist.
- Labels:
-
General
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Reading the documentation the method instrs.SetScaledHeight(d) should do what you need.
/Bjarne
