Jump to content
Developer Wiki and Function Reference Links ×

custom tool questions


grant_PD

Recommended Posts

Try using CreateCustomObject and SetRField. Look them up in the function ref.

Below is a list of the fields you can set for drawing Label.

Couple of pointers.

You have to pass a string to SetRField so if you are using a Number variable to pass you need to use Num2String when you set the record.

Be careful when you pass a value to a pop up in the PIO. If you send a value that is not defined already it can cause problems.

ObjectName:='Drawing Label'

HObject:= CreateCustomObjectN(ObjectName,0,0,0,False);

SetRField(HObject,ObjectName,'Title',Title);

SetRField(HObject,ObjectName,'Drawing',Drawing);

SetRField(HObject,ObjectName,'Sheet',Sheet);

SetRField(HObject,ObjectName,'Num Config',Num Config);

SetRField(HObject,ObjectName,'fScale Config',fScale Config);

SetRField(HObject,ObjectName,'Custom Scale',Custom Scale);

SetRField(HObject,ObjectName,'ArchScale',ArchScale);

SetRField(HObject,ObjectName,'fConfig',fConfig);

SetRField(HObject,ObjectName,'WideBubble',WideBubble);

SetRField(HObject,ObjectName,'TSizeTitle',TSizeTitle);

SetRField(HObject,ObjectName,'TSizeScale',TSizeScale);

SetRField(HObject,ObjectName,'TSizeItem',TSizeItem);

SetRField(HObject,ObjectName,'TSizeSheet',TSizeSheet);

SetRField(HObject,ObjectName,'Factor',Factor);

SetRField(HObject,ObjectName,'LineMode',LineMode);

SetRField(HObject,ObjectName,'Length',Length);

SetRField(HObject,ObjectName,'Flip',Flip);

SetRField(HObject,ObjectName,'Rule Offset',Rule Offset);

SetRField(HObject,ObjectName,'Text Margin',Text Margin);

SetRField(HObject,ObjectName,'Scale Margin',Scale Margin);

SetRField(HObject,ObjectName,'Refer',Refer);

SetRField(HObject,ObjectName,'Scale',Scale);

SetRField(HObject,ObjectName,'Config',Config);

SetRField(HObject,ObjectName,'Scale Config',Scale Config);

SetRField(HObject,ObjectName,'scaleFormat',scaleFormat);

SetRField(HObject,ObjectName,'Title Text',Title Text);

SetRField(HObject,ObjectName,'Bubble Text',Bubble Text);

SetRField(HObject,ObjectName,'Scale Text',Scale Text);

SetRField(HObject,ObjectName,'Drawing Text',Drawing Text);

SetRField(HObject,ObjectName,'Font1 ID',Font1 ID);

____________

VAR LIST

(you will need to deterime what type of VAR these are)

Title

Drawing

Sheet

Num Config

fScale Config

Custom Scale

ArchScale

fConfig

WideBubble

TSizeTitle

TSizeScale

TSizeItem

TSizeSheet

Factor

LineMode

Length

Flip

Rule Offset

Text Margin

Scale Margin

Refer

Scale

Config

Scale Config

scaleFormat

Title Text

Bubble Text

Scale Text

Drawing Text

Font1 ID

_____________

Note that with CreateCustomObject the Custom PIO does not get created in the drawing until the script executes. This means that if you try to use something like GetBBox(hObject,x1,y1,x2,y2); it will return

X1=0

y1=0

x2=0

Y2=0

Edited by Assembly
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...