templates in .pgb files


templates in .pgb files
#1
I'm looking into creating a few templates for WeDo (1 and 2) for the new LPF2 motor and the sensors. I have also created .pgb files for both sets and was wondering if there is a way to include a template in the .pgb file I don't need to go look for those parts in other areas of the parts bin.
Reply
RE: templates in .pgb files
#2
You can do that by adding the [sourceInv=templates] parameter.

For an example see 8071.pbg in the default bin's sets folder.
Reply
RE: templates in .pgb files
#3
(2016-07-30, 15:46)Roland Melkert Wrote: You can do that by adding the [sourceInv=templates] parameter.

For an example see 8071.pbg in the default bin's sets folder.
Thanks - I can see how that works. That brings me to another question:

WeDo 2.0 uses a new kind of cable and plug. Philo has kindly created all the necessary parts, but while I know how to manipulate an existing cable, I have no idea how to generate a cable from scratch. The WeDo 2.0 connector is part number u9219 and the cable segment is u9218. How do I go about creating a length of cable to create append to the WeDo 2.0 tilt and proximity sensors?

edit:
I have tried to modify a copy of the PF M motor template, with little success. The WeDo 2.0 plug seems to think the wire attaches from the side...
Reply
RE: templates in .pgb files
#4
Rough (LQ, also I don't know if the colors are correct) version of the medium one to get you started Smile

Code:
0 Power functions 2 M Motor (LQ)
0 Author: LDCad
0 !CATEGORY electric
0 !KEYWORDS flexible,power functions
0 !LDCAD CONTENT [type=path] [addFallBack=default] [looped=false] [displayKind=mm] [curveStep=0] [displayLenCor=0]

0 !LDCAD PATH_POINT [type=bezier] [posOri=0 -1.126 97.499 1.000001 0 0 0 0.707107 0.707107 0 -0.707107 0.707107] [prevCPDist=25] [nextCPDist=50] [cirR=20] [cirDir=xyCW] [prevYRoll=0] [nextYRoll=0]
0 !LDCAD PATH_POINT [type=bezier] [posOri=0 0 235 1 0 0 0 0 1 0 -1 0] [prevCPDist=60] [nextCPDist=25] [cirR=20] [cirDir=xyCW] [prevYRoll=0] [nextYRoll=0]

0 !LDCAD PATH_SKIN [donCol=256] [donOri=0 0 1 0 1 0 -1 0 0] [donPart=u9218.dat] [donYSize=200%] [donCen=absCen] [donCenYOfs=0] [donFinScale=segMerge] [donPlace=refsDyn] [donYAlign=0] [donInline=false] [segSize=80%] [segSizeTol=5%] [segsCnt=0] [segsGrp=0] [segsMaxMerge=10] [segsMrgAng=0] [segsMrgRollAng=0] [segsEdgeDelKind=keepFirstLeft]

0 !LDCAD PATH_CAP [group=start] [color=15] [posOri=0 0 0 1 0 0 0 1 0 0 0 1] [part=21980.dat] [extraLen=0mm] [inlineRef=false]
0 !LDCAD PATH_CAP [group=end] [color=15] [posOri=0 0 250 -1 0 0 0 -1 0 0 0 1] [part=u9219.dat] [extraLen=0mm] [inlineRef=false]

Place it (e.g. powerFunc2MotorM.ldr) n the C:\Users\Roland\AppData\Roaming\LDCad\templates\path folder  and restart LDCad it should appear in the power funcitons template group.

You can edit templates much the same as normal models inside LDCad (ignore the warning) just be sure to ungroup the endings first (ctrl+shift+g while selected).
Once they become official parts I will add default templates for all of them.
Reply
RE: templates in .pgb files
#5
Thanks! That's really helpful. I should be able to create templates for the sensors from this.
Looking forward to all the parts becoming official. As fas as I can see there's only a handful of uncertified (sub)parts that need approval.
Reply
RE: templates in .pgb files
#6
Hello.
I attach the WeDo 2.0 LDCAD path template files for the M motor, and the two sensors.
Enjoy!

D


Attached Files
.ldr   powerFunc2Tilt.ldr (Size: 1.16 KB / Downloads: 6)
.ldr   powerFunc2Distance.ldr (Size: 1.16 KB / Downloads: 7)
.ldr   powerFunc2MotorM.ldr (Size: 1.15 KB / Downloads: 6)
Reply
RE: templates in .pgb files
#7
(2018-03-03, 15:12)Daniele Benedettelli Wrote: Hello.
I attach the WeDo 2.0 LDCAD path template files for the M motor, and the two sensors.
Enjoy!

D

Thanks Daniele! I see they have been included in LDCad.

Is it possible to include these files in a pbg file with the rest of the elements in a set? If so, how? 
It is not really necessary though,  as they are easy enough to locate in the flexible parts group.
Reply
RE: templates in .pgb files
#8
(2018-05-14, 17:35)Jetro de Château Wrote: Is it possible to include these files in a pbg file with the rest of the elements in a set? If so, how? 
It is not really necessary though,  as they are easy enough to locate in the flexible parts group.

Yes just add
[sourceInv=templates]
after the item.

For an example see
%appdata%/LDCad/partBin/default/sets/8071.pbg
Reply
« Next Oldest | Next Newest »



Forum Jump:


Users browsing this thread: 2 Guest(s)