News:

Be sure your post is relevant to the current discussion.  Create a new topic within the appropriate board if you are unsure.

Main Menu
TurboCAD 2026 Platinum box
Now available

TurboCAD 2026.2

The latest update for TurboCAD 2026. It installs over any 2026 build and keeps your activation, drawings and settings. Get it from the Start Page or Help > Check for Update.

PPM Script Color Properties Issue

Started by TedTheCarpenter, July 03, 2021, 11:50:32 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

TedTheCarpenter

Does anyone know why changing the color parameter in this script fails to change the color of the rectangle? Thanks.

TestColor=Parameter("Test Color",0xff0000,COLOR);
W = Parameter("Width", 4, LINEAR, Interval(0, 1000));
H = Parameter("Height", 12, LINEAR, Interval(0, 1000));

test1=Rectangle(W,H);
test= SetProperties(test1, "PenColor" = TestColor);

Output(test);
Ted D

2017 Pro, 2018>2023 Platinum
Windows 11 Pro 22H2  64GB
Ryzen 9 5900X 12 core
Radeon RX 6600 XT 8GB

Torfinn

It don't fail, if you want it to be Blue ;)
Did you save the file before try to run it ??

Torfinn
V20, V21, 2015 > 2024  Platinum
Deluxe 2015/ 16/ 19
RedSDK enabled
Windows 10 Home Premium (20H2/ 19042.1083) 64 bit, 32 GB
NVIDIA Geforce GTX 780m, 1 GB

TedTheCarpenter

Running the script will give me the blue rectangle. It fails when I select the rectangle and try to change the color in the Selection Info palette (Parametric Symbol/ Symbol Parameters). I can change the width or length but not the color. The PPM file and the TCW file have been saved. I'm trying to use it in a much larger script file and it crashes Turbocad when I try to change the color parameter.
Ted D

2017 Pro, 2018>2023 Platinum
Windows 11 Pro 22H2  64GB
Ryzen 9 5900X 12 core
Radeon RX 6600 XT 8GB

John R

Confirm

The color won't change in Selection Info / Parametric Symbol section.
John R.

V17—V21, 2015—2025
Designer, Deluxe, (Basic, Expert, Professional), Platinum
RedSDK enabled
Windows 11 Pro (25H2), 64-bit

TedTheCarpenter

There's another twist: Changing the height or width works but if you then try to change the color it reverts to the original size.
Ted D

2017 Pro, 2018>2023 Platinum
Windows 11 Pro 22H2  64GB
Ryzen 9 5900X 12 core
Radeon RX 6600 XT 8GB

Torfinn

#5
I don't think you can change the color that way, and it don't crash here, but the txt change to black, even if layer 0 is set to red in a new from scratch drawing, if i try to change it from Library Palette.

Try set up a list like;

Blue = "PenColor"=0xff0000);
Green = "PenColor"=1x0ff0f);
etc, etc
Then set up a Parameter using "Set" and have choice between the different colors using IF pointing to the different colors.
I believe that will work.

Just see your comment
It don't revert back to original size here if i set it to 5 x 5 before try to change color to 1x0ff0f ( Lime Green ) in SI Palette

Torfinn
Edit;
You can also set it to a specific Layer and then Color by Layer, easy to change in DD

V20, V21, 2015 > 2024  Platinum
Deluxe 2015/ 16/ 19
RedSDK enabled
Windows 10 Home Premium (20H2/ 19042.1083) 64 bit, 32 GB
NVIDIA Geforce GTX 780m, 1 GB

TedTheCarpenter

It's still behaving the same on my end. It's possible that some configuration setting is causing the different behavior but I think that it's more likely that it's a TC bug.
Ted D

2017 Pro, 2018>2023 Platinum
Windows 11 Pro 22H2  64GB
Ryzen 9 5900X 12 core
Radeon RX 6600 XT 8GB

Torfinn

I use v 2021 and latest build ( 60.1 ) when tested.
Have you checked if you have a tmp file in the place you save your ppm file, can happen after crash made by a ppm.
Else, rename/ delete your Built-in folder, then you need to load your cfg (UI), template and materials maybe, when you start TC again.
Hopefully that will fix it at your end.

Torfinn
V20, V21, 2015 > 2024  Platinum
Deluxe 2015/ 16/ 19
RedSDK enabled
Windows 10 Home Premium (20H2/ 19042.1083) 64 bit, 32 GB
NVIDIA Geforce GTX 780m, 1 GB

TedTheCarpenter

No tmp file and I moved the built-in folder and had TC rebuild it- no joy. I'm running 2021 Platinum (28.0) but my build is 50.0. When I check for an update TC tells me I have the current build. Is 60.1 a beta version?
Ted D

2017 Pro, 2018>2023 Platinum
Windows 11 Pro 22H2  64GB
Ryzen 9 5900X 12 core
Radeon RX 6600 XT 8GB

Torfinn

No, it's the last public one
come out today
https://forums.turbocad.com/index.php/topic,28478.msg167921.html#new

First time i run your ppm i was on a beta, b 57.3, as b59.3 in public have an issue, maybe more, but the wall style was a issue for me. so rolled back to 57.3, until i installed the full ESD 60.1 and then tested insert your ppm from Library

Torfinn
V20, V21, 2015 > 2024  Platinum
Deluxe 2015/ 16/ 19
RedSDK enabled
Windows 10 Home Premium (20H2/ 19042.1083) 64 bit, 32 GB
NVIDIA Geforce GTX 780m, 1 GB

Torfinn

Then i see why it don't go back to original, i did take away ",COLOR" in 1st parameter

Torfinn
V20, V21, 2015 > 2024  Platinum
Deluxe 2015/ 16/ 19
RedSDK enabled
Windows 10 Home Premium (20H2/ 19042.1083) 64 bit, 32 GB
NVIDIA Geforce GTX 780m, 1 GB

nikkipollard

#11
I don't think it makes a difference but use decimal codes
for colour I use a separate ppm (macro)  - with colour codes.
See the example.

John shared a colour code list on this thread
file:///C:/Users/User/AppData/Local/Temp/Temp1_TurboCAD%20Colors%20(3).zip/TurboCAD%20Colors.html
Nikki
TC20 platinum, TC 2015 platinum
TC 2017 with lightworks
TC 2021 platinum
Windows 11 Home 22h

Alvin Gregorio

Quote from: nikkipollard on July 04, 2021, 12:06:04 AM
I don't think it makes a difference but use decimal codes
for colour I use a separate ppm (macro)  - with colour codes.
See the example.

John shared a colour code list on this thread
file:///C:/Users/User/AppData/Local/Temp/Temp1_TurboCAD%20Colors%20(3).zip/TurboCAD%20Colors.html

Hi Nikki.  Is not your link to a local directory on your system?
Alvin Gregorio
TurboCAD: v2024_Plat (31.0.77.1); v2022_Plat; v2020_Plat; v2019_DL; v20.2_PP
Lenovo Thinkpad P20Y laptop; Windows 11 Pro; i7-11800H 2.30GHz, 8-core; 32GB RAM; NVIDIA T1200
3D_Printer: Ender-3 S1 (NOT Pro)

Torfinn

I believe Nikki think about Attached

Torfinn
V20, V21, 2015 > 2024  Platinum
Deluxe 2015/ 16/ 19
RedSDK enabled
Windows 10 Home Premium (20H2/ 19042.1083) 64 bit, 32 GB
NVIDIA Geforce GTX 780m, 1 GB

Alvin Gregorio

Alvin Gregorio
TurboCAD: v2024_Plat (31.0.77.1); v2022_Plat; v2020_Plat; v2019_DL; v20.2_PP
Lenovo Thinkpad P20Y laptop; Windows 11 Pro; i7-11800H 2.30GHz, 8-core; 32GB RAM; NVIDIA T1200
3D_Printer: Ender-3 S1 (NOT Pro)

TedTheCarpenter

Thanks Nikki. Choosing from a text list of colors and then converting the choice to a decimal color code works fine. But the choices are quite limited compared to the full range offered by the (buggy) COLOR parameter method.

Thanks for the link to the 60.1 update Torfinn. The patch version didn't work (perhaps the b60.1 means it's a beta version). I won't try the full install until our 4th of July holiday is over so I can reach tech support if something goes wrong.
Ted D

2017 Pro, 2018>2023 Platinum
Windows 11 Pro 22H2  64GB
Ryzen 9 5900X 12 core
Radeon RX 6600 XT 8GB

Torfinn

No, the link was to Public builds
I stop use Patch in about v 19, as back then there was "always" issues with it.
So i un-install, delete version from Appdata and re install the full ESD, if there is, sometimes it's just the Patch, so then i use that one, but ESD is always first choice.

To achieve what you want i think the Layer route is the way to go, as then you can change Layer Color to whatever you want afterwards.
But the Layer have to be in the drawing before insert the symbol, as the ppm will not make it, else everything will go to Layer 0
Attached show from my template, DD and a ppm file

Torfinn
V20, V21, 2015 > 2024  Platinum
Deluxe 2015/ 16/ 19
RedSDK enabled
Windows 10 Home Premium (20H2/ 19042.1083) 64 bit, 32 GB
NVIDIA Geforce GTX 780m, 1 GB

John R

Quote from: Torfinn on July 04, 2021, 06:36:01 AM
I believe Nikki think about Attached

Torfinn

I believe that's the file. Just an HTML file that lists all the TurboCAD Colors and their different ways to 'code' a color.
John R.

V17—V21, 2015—2025
Designer, Deluxe, (Basic, Expert, Professional), Platinum
RedSDK enabled
Windows 11 Pro (25H2), 64-bit

TedTheCarpenter

Yup, using Layers to adjust the colors is a workaround. My script creates a roof with framing, sheathing, trim, etc. It will be used in drawings that already have lots of layers. The ability to change the colors of the various elements in the SI palette would be much simpler. BTW, I took a chance and installed the full version of build 60.1. It worked but the COLOR parameter still does not work.
Ted D

2017 Pro, 2018>2023 Platinum
Windows 11 Pro 22H2  64GB
Ryzen 9 5900X 12 core
Radeon RX 6600 XT 8GB

Alvin Gregorio

I think-- I don't fully remember-- that if we make the PPM script object a Group-- either in the script, or after inserting it-- and having assigned the Color to be "By Block" (I don't recall now what that script dialog is; am away from computer) we can change the inserted PPM script object's pen color after insertion via Properties, Property Toolbar, Selection Info/Pen.

Then, to edit the object's Parameters, we would have to Edit Group Contents to do so.

I'd have to get back to my computer-- and/or review that Forum thread I linked to-- to recall if and how this works
Alvin Gregorio
TurboCAD: v2024_Plat (31.0.77.1); v2022_Plat; v2020_Plat; v2019_DL; v20.2_PP
Lenovo Thinkpad P20Y laptop; Windows 11 Pro; i7-11800H 2.30GHz, 8-core; 32GB RAM; NVIDIA T1200
3D_Printer: Ender-3 S1 (NOT Pro)

Torfinn

Quote from: TedTheCarpenter on July 04, 2021, 10:16:45 AM
Yup, using Layers to adjust the colors is a workaround. My script creates a roof with framing, sheathing, trim, etc. It will be used in drawings that already have lots of layers. The ability to change the colors of the various elements in the SI palette would be much simpler. BTW, I took a chance and installed the full version of build 60.1. It worked but the COLOR parameter still does not work.

It's easy to make a few extra layers, and put them in to a filter ;)
I agree it would be more easy to change directly in SI, but if it don't work, it don't work, and will never be changed in TC.
So by that it is to find the workaround that fit best to your use.
You can also give it a material that is just a color, and that material you can also change to your like after insert of symbol.

I remember vaguely what Alvin was mention, but there was issues with it, and cumbersome to use Group edit, compered to Layer,
but we see if he find the tread again.

Torfinn
V20, V21, 2015 > 2024  Platinum
Deluxe 2015/ 16/ 19
RedSDK enabled
Windows 10 Home Premium (20H2/ 19042.1083) 64 bit, 32 GB
NVIDIA Geforce GTX 780m, 1 GB

TedTheCarpenter

The thought that it will never change in TC is rather discouraging. But you're right: it is what it is. Do what you can and move on.
Ted D

2017 Pro, 2018>2023 Platinum
Windows 11 Pro 22H2  64GB
Ryzen 9 5900X 12 core
Radeon RX 6600 XT 8GB

nikkipollard

#22
layers are the easiest.
I thought I shared a link where I showed a method  using rgb codes to change colour.
which is more painful than a list of colours but you can use any rgb colour combination..  Not sure how The wrong link copied
you can read the rgb colours off the colour palette.


https://forums.turbocad.com/index.php/topic,26353.msg161377.html#msg161377
Nikki
TC20 platinum, TC 2015 platinum
TC 2017 with lightworks
TC 2021 platinum
Windows 11 Home 22h

TedTheCarpenter

Thanks Nikki. Changing the component colors in the script is better because I'll be I'll be exploding the parametric roof and assigning the various components to different layers. If I use layers to assign the color it won't stick because the color will be "By Layer."  I would need to select the entire layer and change to color with the SI palette. And SI palette won't permit global property changes if the count is too high.
Ted D

2017 Pro, 2018>2023 Platinum
Windows 11 Pro 22H2  64GB
Ryzen 9 5900X 12 core
Radeon RX 6600 XT 8GB

Torfinn

After you have exploded it Ted, and selected the parts you want on a different layer, why not just set them to color instead of By Layer in SI Palette before you set them to the new Layer if you want a special color on this parts.
Must be more easy than calculate the number IMO.
And you can select them again by color using Ctrl + K ( = color ) in the other Layer

Most likely why you cant set them all in 1 go is because they are different objects, like Polyline and Acis Solids if you have used a  Boolean tool on some of them in your ppm.

Torfinn
V20, V21, 2015 > 2024  Platinum
Deluxe 2015/ 16/ 19
RedSDK enabled
Windows 10 Home Premium (20H2/ 19042.1083) 64 bit, 32 GB
NVIDIA Geforce GTX 780m, 1 GB

TedTheCarpenter

They are mostly ACIS Solids and I'd use the colors to select and assign layers for the various component types (rafters, ridges, hip and valley beams, over frame plates, sheathing, fascia and soffit trim, sub fascia, etc). The assigned layer names would vary because the roof assembly would be on various stories. I really appreciate your input Torfinn.
Ted D

2017 Pro, 2018>2023 Platinum
Windows 11 Pro 22H2  64GB
Ryzen 9 5900X 12 core
Radeon RX 6600 XT 8GB

nikkipollard

Maybe I don't understand you.
There is no need to explode a ppm - It defeats the object of using a ppm.
You can set the layer of the object in the ppm. If you are going to use the colours to set the layers
Why don't you just assign each object to a layer in the ppm.
You can set the layers as text parameters - To change them if you have to.
Something like this

Rlay = Parameter("Layer/Rafter Layer", "Rafters" , TEXT)
RidLay = Parameter("Layer/Ridge Layer", "Roof Ridge" , TEXT)
// define rafters using whatever code

//
Rafter1 = SetProperties(R1,"Layer" = Rlay, "PenColor" = -3)
Ridge1 = SetProperties(Rd3,"Layer" = RidLay, "PenColor" = -3)


I agree with Torfinn with regards to calculating colours.

Nikki
TC20 platinum, TC 2015 platinum
TC 2017 with lightworks
TC 2021 platinum
Windows 11 Home 22h

TedTheCarpenter

Nikki, exploding the parametric part does not defeat my purpose- I'm using it to automatically draw a complete roof. I'll modify the base dimensions, framing, sheathing, and trim sizes before moving it to the top plate on my drawing. Exploding it is then necessary for a couple of reasons: I'll usually need to alter it with Boolean operations because of dormers, intersecting roofs, chimneys, etc. I'll then isolate it and select the various components by color. I can then change the layer and info in the SI palette. The layer names will vary depending on what floor the roof is on. If it's a 3rd floor roof the layer name will begin with "3FL", etc. The info property is set to the variable name in the script and cannot be changed within the script. I export a Report to Excel and use it to generate a bill of materials.
I need to change the info field to the member size (2x10, 1x8, etc.) so that Excel can calculate the length based on the extents size.
Ted D

2017 Pro, 2018>2023 Platinum
Windows 11 Pro 22H2  64GB
Ryzen 9 5900X 12 core
Radeon RX 6600 XT 8GB

nikkipollard

#28
I hear you.
I have had the same dilemmas with ppms.
I use layers as a text parameter in a ppm - change the parameter as needed and everything is in the layer you want it to be in.
I add custom properties to graphics in the ppm - when the ppm is exploded the data can be retrieved using the report - just regen before hand.
Also bear in mind if you use a boolean operation the custom properties will be lost but if you make a copy of the graphic before doing the boolean operation you can paint the custom properties to the new graphic.
you add custom properties to graphics like this.

g = SetProperties(g1,"Width" = W, "Height" = H, "Length" = L)

I have added an example of using custom properties in a ppm. I think it saves time ultimately



Nikki
TC20 platinum, TC 2015 platinum
TC 2017 with lightworks
TC 2021 platinum
Windows 11 Home 22h

TedTheCarpenter

That's a great idea but it won't work in my script because I'm creating multiple copies of the original rafter. If you add the Move statement to your example.ppm the layer and color properties work but the custom properties do not.

Prof2 = RotateY(Prof,-P)
Prof3=Move(Prof2,0,100,0,6)
Rafter = SetProperties(Prof3,"Layer" = LayerName,"PenColor" = -3,
    "Height" = H,"Depth" = D,"Length" = L,"Timber Grade"=TG,"Pitch"=P)
Ted D

2017 Pro, 2018>2023 Platinum
Windows 11 Pro 22H2  64GB
Ryzen 9 5900X 12 core
Radeon RX 6600 XT 8GB

Torfinn

Thanks Nikki, a very nice way to make it a bit flexible.

But what do you do with it in the way Ted work with ppm and making hip roofs, rafter that fit between 45 degree hip and valley beam's, different size along a valley and hip beam and soffit trim in example and later need the length for a BOM ?
Extents is not 100 % correct, it's a tad larger then what we need, depending of how it's cut and dimension of the rafter.

Torfinn
V20, V21, 2015 > 2024  Platinum
Deluxe 2015/ 16/ 19
RedSDK enabled
Windows 10 Home Premium (20H2/ 19042.1083) 64 bit, 32 GB
NVIDIA Geforce GTX 780m, 1 GB

TedTheCarpenter

Torfinn, I can determine the overall length of the rafter if I know the value of the extents. I first get the diagonal length of a cross section of the rafter (Sqrt(width^2+depth^2)) and call it the Leg. The length of the rafter is Sqrt(Extents^2-Leg^2). I use it to create my cut list and order the lumber for the project. I put the length and depth information in the info property because it's less of a hassle than creating and attaching a field in the custom properties. I can also access the info property directly in the SI palette.
Ted D

2017 Pro, 2018>2023 Platinum
Windows 11 Pro 22H2  64GB
Ryzen 9 5900X 12 core
Radeon RX 6600 XT 8GB

Torfinn

I know Ted, i take it in to Excel also for making the Cut list, as then i can calculate time and material price for build it in my Calc sheets.
But we seldom use Hip roof's, it's basically Gable, Flat and Skeleton now, but there is Dormers,L and T shapes, so we get the valley's.

I was more thinking about how Nikki do it, if she is able to get the info directly from the ppm.
From Valley to Ridge and Hip to Raft/ Sofit ?, when the rafters have correct shape to where they should be and named to say exactly where they belong on the building.
Think a Pre-Cut set of materials, every piece have it's unique name and placement for the carpenter to use when they build it.

Torfinn
V20, V21, 2015 > 2024  Platinum
Deluxe 2015/ 16/ 19
RedSDK enabled
Windows 10 Home Premium (20H2/ 19042.1083) 64 bit, 32 GB
NVIDIA Geforce GTX 780m, 1 GB

nikkipollard

I have a few simple 3d trusses. I use the pattern tools to copy them as needed. But they are just for show as most roofs here are calculated by the roofing companies who have the right software.
What I would do is extract the parameters from the ppm using the sdk then redo all the calculations in a program in excel or (vba) based on the parameters , it seems like a waste of time because the ppm has already done the calculations. but I have tried using the sdk to copy the ppm and explode it and then extracting the data and then deleting the copy = it takes so long whereas extracting the parameters and recalculating is quicker.
I can use the same  script to extract data from all my ppms,


Nikki
TC20 platinum, TC 2015 platinum
TC 2017 with lightworks
TC 2021 platinum
Windows 11 Home 22h

Torfinn

Thanks Nikki

I do the same with trusses, they are just for visual as the truss company's make them anyway, so i don't need to calculate anything there.
I have a 1 story house where i can change between rafter and A, W and M truss.
So it's basically roof with rafters i do calculations for.
And everything i cut with a boolean operation, i also make a box on a separate layer with correct height, and get the thickness from there when i export the BOM to Excel.
Except 4 small pieces where the gable wall at 2,4 meter meet the roof, i did not care to calculate them, so they come as AoS (Adjust on Site): Many times we don't need them at all.

I record a Macro file for explode when i make the first house construct ppm, dang it was slow :), but it was kind of funny to watch when it worked, and piece by piece turn magenta.

Torfinn
V20, V21, 2015 > 2024  Platinum
Deluxe 2015/ 16/ 19
RedSDK enabled
Windows 10 Home Premium (20H2/ 19042.1083) 64 bit, 32 GB
NVIDIA Geforce GTX 780m, 1 GB

TedTheCarpenter

Nikki,

I'm not using the ppm for trusses because the truss company supplies the stamped engineered drawings and the trusses. But we do lots of custom home roofs that can't be done with trusses (cathedral ceilings, gazebo hip roofs, etc). The same is true for additions that intersect with an existing stick-built roof. I'd be delighted if I could assign a custom property to each component with the ppm but so far I haven't found a way to do that.

Ted
Ted D

2017 Pro, 2018>2023 Platinum
Windows 11 Pro 22H2  64GB
Ryzen 9 5900X 12 core
Radeon RX 6600 XT 8GB

nikkipollard

Did you look at my example Ted.
It's  easy but tedious , although it is less boring then adding the custom properties afterwards,
basically you add the custom property when you set the properties of the object.
If the Property you set is not recognised as a standard property it becomes a custom property.
You don't see the custom properties until you explode the ppm - Which you are doing anyway.
After you explode the ppm you can check, by opening the property page of the graphic and going to custom properties - They should be there. Hit regenerate and you will see the properties in the SI palette.
Or before extracting a report , There is a regenerate in the menu.
Nikki
TC20 platinum, TC 2015 platinum
TC 2017 with lightworks
TC 2021 platinum
Windows 11 Home 22h

nikkipollard

#37
Quote from: Torfinn on July 05, 2021, 04:53:45 PM
Thanks Nikki

I do the same with trusses, they are just for visual as the truss company's make them anyway, so i don't need to calculate anything there.
I have a 1 story house where i can change between rafter and A, W and M truss.
So it's basically roof with rafters i do calculations for.
And everything i cut with a boolean operation, i also make a box on a separate layer with correct height, and get the thickness from there when i export the BOM to Excel.
Except 4 small pieces where the gable wall at 2,4 meter meet the roof, i did not care to calculate them, so they come as AoS (Adjust on Site): Many times we don't need them at all.

I record a Macro file for explode when i make the first house construct ppm, dang it was slow :), but it was kind of funny to watch when it worked, and piece by piece turn magenta.

Torfinn

That is where I think using a combination of PPms and a more sophisticated programing language works well.
Instead of drawing the boxes and extracting a BOM you can extract the Parameters and do the calculations.
Other programing languages are able to loop through tasks -so you aren't as limited and it is less time consuming because 40 lines in a ppm takes 2 or 3 lines using another programming language -
Whereas to make a parametric rounded rectangle using the SDK is a long drawn out process but only a few lines in a ppm.
Nikki
TC20 platinum, TC 2015 platinum
TC 2017 with lightworks
TC 2021 platinum
Windows 11 Home 22h

nikkipollard

Going back to your original question Ted - It is a bit of a hack - but if you know how to create windows forms you could write a small program that will run a windows colour dialogue and change the colour parameter in your ppm.
Save a shortcut to the program on your taskbar.
I set the parameter up like this in the ppm

Parameter("Colour/Circle Colour",255,Interval(0,16777215))

The program looks for all the parameters in the selected ppm that start with "Colour/" and adds a button for each parameter that meets that criteria.
If you change a colour then changes all the ppms in the selection with the same parameter.


Nikki
TC20 platinum, TC 2015 platinum
TC 2017 with lightworks
TC 2021 platinum
Windows 11 Home 22h

Torfinn

I agree on that Nikki, it would have been nice to get the info without explode the ppm, but i need to learn how to in a different language first.
And yes, it did take some time to make the box's, but it will take similar time to write the same in Excel too, so ...., now i only need to remember and turn that layer on before explode it :), as it is there already on the 3 different house ppm i have so far.

We only need the Parameter to calculate everything in Excel, but then there are no eye candy, and that part do sell job's.
I used it for that earlier when i was building houses, now i just draw them and sometime give out a material list and hour for carpenter, but no price anymore.
I have a quick calc in Excel, it take me just a few minutes to print out a price on a "standard" 1,5 > 2 story rectangular house, from digging to key in door, and i can also take out the material list and hour for carpenter from that too, 1 click away :)
The material price's is not updated the last years on that one as i don't need it anymore.
My suppliers full pricelist was massive, about 100 K product, and i used only 167 or 164 of them in my extracted pricelist :))

Torfinn
V20, V21, 2015 > 2024  Platinum
Deluxe 2015/ 16/ 19
RedSDK enabled
Windows 10 Home Premium (20H2/ 19042.1083) 64 bit, 32 GB
NVIDIA Geforce GTX 780m, 1 GB

TedTheCarpenter

Hi Nikki,
Yes I did look at your example but I can't get the custom properties to work in my ppm. I'm using Boolean Subtraction to create the hip and valley rafters. The ppm acts the same as drawing in TC would: The custom properties are lost after the Boolean operation. I will dust off my copy of VB6 and look into creating a color window.

Ted
Ted D

2017 Pro, 2018>2023 Platinum
Windows 11 Pro 22H2  64GB
Ryzen 9 5900X 12 core
Radeon RX 6600 XT 8GB

Torfinn

Extracted Parameter values from ppm in TC
Only left to figure out an easy way to take away "mm" so i can use the numbers if wanted and make a sheet for calculations.

Torfinn
V20, V21, 2015 > 2024  Platinum
Deluxe 2015/ 16/ 19
RedSDK enabled
Windows 10 Home Premium (20H2/ 19042.1083) 64 bit, 32 GB
NVIDIA Geforce GTX 780m, 1 GB

TedTheCarpenter

One way would be to use Excel with a =LEFT(TRIM(String),LEN(TRIM(String)-3) function.
Ted D

2017 Pro, 2018>2023 Platinum
Windows 11 Pro 22H2  64GB
Ryzen 9 5900X 12 core
Radeon RX 6600 XT 8GB

Torfinn

Thanks Ted

I will try to figure out that, i'm not used to the new version of excel yet, have been used the old 2007 for a loooong time :)
Earlier i could set Tab and space by just check them, that was not possible in the new when i import data.
But also just add a "_" in the Parameter name is an option i assume, as i use 1,2 and 3 word now.

Torfinn
V20, V21, 2015 > 2024  Platinum
Deluxe 2015/ 16/ 19
RedSDK enabled
Windows 10 Home Premium (20H2/ 19042.1083) 64 bit, 32 GB
NVIDIA Geforce GTX 780m, 1 GB

nikkipollard

#44
How did you extract the parameters?
If you used a script - You can replace the text
value= Replace(value," mm","")
I think excel has the equivalent function called Substitute
and the text to columns tool works
Nikki
TC20 platinum, TC 2015 platinum
TC 2017 with lightworks
TC 2021 platinum
Windows 11 Home 22h

nikkipollard

Ted add the custom properties to the graphics that go in the output.
after the boolean operation.
Nikki
TC20 platinum, TC 2015 platinum
TC 2017 with lightworks
TC 2021 platinum
Windows 11 Home 22h

TedTheCarpenter

Nikki,
When I do the BooleanSubtract to my rafters at the hip and valley lines the ppm automatically groups the result. Applying the custom properties to the the group in the Output statement does work. The problem is that I need to explode the group after I place the roof in my drawing and the custom properties are lost in doing so. I'm exploding the group of rafters for a couple of reasons: I usually need to shift or modify individual rafters for dormers, intersecting roofs, chimneys, skylights, etc. The other reason is my BOM method. I need the info field to have the depth, width, and type of the the framing member (2x10 rafter, 1x8 fascia, etc.). Each component type has a unique color so its a simple mater of selecting by color to change the info field in the SI palette. I use a VB6 program that determines the cut list length from the extents field in the exported report, sorts it and sends it to Excel.
Ted D

2017 Pro, 2018>2023 Platinum
Windows 11 Pro 22H2  64GB
Ryzen 9 5900X 12 core
Radeon RX 6600 XT 8GB

Torfinn

Quote from: nikkipollard on July 06, 2021, 09:36:02 PM
How did you extract the parameters?
If you used a script - You can replace the text
value= Replace(value," mm","")
I think excel has the equivalent function called Substitute
and the text to columns tool works

My brain had a small awake moment yesterday Nikki :) and i start think about the Audit report, tested that and it work like a charm.
So printed the report to Turbopdf, saved the file and export to Excel, copy what i want and paste in to Note and saved the txt file.
In Note the replace was easy, mm with nothing and then import to Excel.
But still think maybe i need to change the Parameternames for more easy search when i sort it in Excel, but have to test a bit more later today/ evening.

Torfinn
V20, V21, 2015 > 2024  Platinum
Deluxe 2015/ 16/ 19
RedSDK enabled
Windows 10 Home Premium (20H2/ 19042.1083) 64 bit, 32 GB
NVIDIA Geforce GTX 780m, 1 GB

Torfinn

Horray, it still work :))
Why import it when it's already inside excel, just to insert the data to the calc file afterwards, Say no more :), but i was busy as i was on my way to get the second shot on my last post.
In Excel seek and replace, finish, the info is at the same place every time so a small Macro will fix it.
So then it's just to set up the calc if i want to do it this way.

Torfinn
V20, V21, 2015 > 2024  Platinum
Deluxe 2015/ 16/ 19
RedSDK enabled
Windows 10 Home Premium (20H2/ 19042.1083) 64 bit, 32 GB
NVIDIA Geforce GTX 780m, 1 GB

nikkipollard

Ok Ted so this is a bit of a hack work around - based on the fact that you want to use colour.
You can try this small program - No guarantees I am not a programmer -
It  will read your ppm , look for all the parameters in this format.
col1=Parameter("Colour/Rafter Colour",-3,Interval(-4,16777215))
Gives you a list of the parameters with a button for each one that takes you to a color dialogue.
Choose the colour and it changes all the selected ppms with a matching colour parameter.



This part is important "Colour/ - else it wont work (you can try Color instead of Colour (but I am not American so I used colour and as an after thought I added Color as an option)
Save a shortcut to the exe file to your taskbar - for easy access.
Obviously this is not ideal and it would be a lot better if Turbocad just fixed the bug with colour and material parameters.
If this doesn't work I give up.
Test it on the attached example ppm file first.




Nikki
TC20 platinum, TC 2015 platinum
TC 2017 with lightworks
TC 2021 platinum
Windows 11 Home 22h