first step is to try to understand the toolsbars, commands and the lip-files.
A easy example: edit reference of Element
This button is inside the attributes-toolbar.
The attributes-toolbar for the Design(Top-Files) is inside
inside this file you will found this code for the button.
Code: Select all
#Men#Attribute#Reference #0,3041,14 = CATEGORY "#Icn#Category#Attributes" INTERRUPT $TOPHOME/d/l/setref 10 ;
The last part is the source path of the lob-file.
$TOPHOME/d/l/setref =
C:/Missler/V6xx/d/l/setref
When you install the Module Top-Lip you will get for many lob-files also the lip-files. The lipfiles are the sourcecode.
Inside this file you will find at the beginning some notes of original programmer and changenotes inside clips "()".
The following rows shows the definition of needed variables.
Code: Select all
LABEL label
LABEL labroot
LABEL labset
STRING ref
STRING des
INT n
INT nf
INT typf
STRING propname
INT break
INT exit
INT stop
INT ch
INT answ
The next rows shows the steps from our button.
There are a lot of "if" "else" and so on.
I know from the lip help file "C:\Missler\V614\local\englishUS\TopLIP.doc"
that the variable type "LABEL" is a mix of current document ID and Element ID (@123).
! = write in variable
? = read from variable
Take a look on these code in row 108
Code: Select all
label? DWcrerootifgen label! labroot!
From the rigth to the left here the translation:
labroot = label = DWcrerootifgen of label-value
I am not 100% sure but these code generated the needed LABEL for the next step.
Now take a look to the main Code. It is only one row.
From the rigth to the left here the translation:
DW
setrefprop ref-value for labroot
This code fill in the our wanted ref.value inside a element.
So here a example of my knowlege about this self-studie.
Code: Select all
(define the needed variable for ElemntID as integer)
INT elementid
(define the mixing Variable for ElementID and DocID as label)
LABEL labroot
(define the needed variable for Refvalue as string)
STRING refvalue
(set the Label with ElementID=@57 without @)
57 elementid!
(set the ref-text inside the variable refvalue)
"text123" refvalue!
(mix and set ElementID with docID. I found this code in a other lip-file)
DDOCWgetcrtid elementid? BuildLabelFromIdentifiers labroot!
(fill in the reftext for our element)
labroot? refvalue? DWsetrefprop
(exit this lip/lop file)
QuitMacro
Last steps for the test
1. You need to save the code above inside C:\editref.lip
2. You need an Element with the correct ID @57 or you change the code for this test.
3. You need to convert the lip to a lob file (cmd= C:\Missler\V614\toplip.exe C:\editref.lip) Module TopLip have to be already installed.
4. You need a working test-VB-Projekt with TopSolid API
5. Use this code to activate our lob file
Code: Select all
IApplication.ExecuteMacro(C:\editref.lob)
This is only for trying to understand france-lip-code-language.
This code does only work for one element.
The next learning step comes after first positive experience with this example
good luck