Skip to main content
AndrewK
Community Manager
August 7, 2023
Question

Inserting Code Samples in Community Posts

  • August 7, 2023
  • 2 replies
  • 5730 views

If you need to share code in a community post, you can use the "Code" option in the three dots menu.

 

A new window for you to insert your code pops up, with a code preview at the bottom.

There is syntax highlighting available for a variety of languages.

Apache

Bash

C

C#

CSS

Diff

HTML

HTTP

INI

Java

JavaScript

JSON

Makefile

Markdown

Nginx

NQE

Objective-C

Perl

PowerShell

PHP

Python

Ruby

SQL

Swift

VBScript

XHTML

XML

YARA

 

Last edited by Catalina, April 2026

    2 replies

    KenFarley
    21-Topaz II
    June 15, 2026

    Kind of odd that there is no syntax highlighting for Creo relations.

    Michael_Bourque
    12-Amethyst
    June 15, 2026
    Here is a list of Creo Relations to add for code highlighting:

    abs, acos, asin, atan, atan2, average, bound, cable_len, cable_thick, cbl_logical_file, ceil, comparegraphs, cos, cosh, count_rows, dbl, dbl_in_tol, dead, eang, ecoordx, ecoordy, edist, elen, evalgraph, exists, exp, extract, false, fill_list, floor, has_value, if, in, in_tol, int, itos, ln, log, lookup, lookup_exact, lookup_inst, lookup_interpolate, match_value, massprop_param, material_param, max, memb_i, memb_v, min, mod, model, mp_assigned_mass, mp_cg_x, mp_cg_y, mp_cg_z, mp_mass, mp_surf_area, mp_volume, name, near, no, pi, pow, rel, rel_model_name, rel_model_type, round, rtos, search, sign, sin, sinh, smt_def_bend_rad, smt_thickness, sqrt, strcmp, strcat, string_ends, string_length, string_match, string_pattern, string_starts, strfind, strlen, strlower, strtrim, strupper, substring, tan, tanh, trajpar, trajpar_of_pnt, true, unit, value, value_by_argument, weighted_average

     

    Michael Bourque
    KenFarley
    21-Topaz II
    June 15, 2026

    I would think that a proper syntax highlighter would format things based on not just function names, but also logic blocks, and would thus have to include:

    (1) if, endif, else, etc.

    (2) Comments in a different font and/or color.

    (3) Given Creo has no user-defined subroutines/functions/whatever it could, but might not, provide feedback if the user has called for a nonexistant function (i.e. red font color if you type sinn(X) instead of sin(X).