Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

VMS must die!


devel / comp.lang.tcl / Tcl for Creo Parametric

SubjectAuthor
o Tcl for Creo ParametricTcl 4 Creo

1
Tcl for Creo Parametric

<d752e88a-bd70-40ab-9841-ad25a25ca4aan@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=19496&group=comp.lang.tcl#19496

  copy link   Newsgroups: comp.lang.tcl
X-Received: by 2002:ae9:ec15:0:b0:6a3:304c:504b with SMTP id h21-20020ae9ec15000000b006a3304c504bmr19388139qkg.662.1654602148937;
Tue, 07 Jun 2022 04:42:28 -0700 (PDT)
X-Received: by 2002:a05:6830:1bf8:b0:60b:144c:f246 with SMTP id
k24-20020a0568301bf800b0060b144cf246mr12034583otb.337.1654602148719; Tue, 07
Jun 2022 04:42:28 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.tcl
Date: Tue, 7 Jun 2022 04:42:28 -0700 (PDT)
Injection-Info: google-groups.googlegroups.com; posting-host=2003:ee:9733:2d00:753b:2092:fc3b:7e7;
posting-account=LD1oywoAAAAXOul-F1ymozKc093lE7A5
NNTP-Posting-Host: 2003:ee:9733:2d00:753b:2092:fc3b:7e7
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <d752e88a-bd70-40ab-9841-ad25a25ca4aan@googlegroups.com>
Subject: Tcl for Creo Parametric
From: tcl4creo@gmail.com (Tcl 4 Creo)
Injection-Date: Tue, 07 Jun 2022 11:42:28 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 2358
 by: Tcl 4 Creo - Tue, 7 Jun 2022 11:42 UTC

Now compiled with Creo Parametric 9.0 libs and Tcl 8.6 (no more deprecated Creo Calls in use)
More Info on the Tcl's Wiki and/or Youtube

#Dirty parameter sample, foreach model in session set the parameter MyParam as a String with the value „Hello Tcl“
# This may fail on lock or parameter is not a string
foreach Model [ps::glob *.prt] {
ps::param set -model $Model — MyParam String „Hello Tcl“
}

# Same Task but More Checks
# Get all part files in session and loop through
foreach Model [ps::glob *.prt] {
# Check if already exists
if { [ ps::param exists -model $Model — MyParam ] } {
# Get the Parameter Handle
set paramObj [ps::param list -model $Model — MyParam]
# If the parameter is a string, else do nothing
if {[string equal [$paramObj get -type] STRING]} {
# Set if we have a different value only
if {[string compare [$paramObj cget -value] „Hello Tcl“]} {
# This may fail on lock (Relation usage), but this can be checked as well
$paramObj config -value „Hello Tcl“
}
}

} else {

# Just set the parameter in Creo
ps::param set -model $Model — MyParam String „Hello Tcl“

}
}

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor