<?xml version="1.0" encoding="UTF-8"?>        <rss version="2.0"
             xmlns:atom="http://www.w3.org/2005/Atom"
             xmlns:dc="http://purl.org/dc/elements/1.1/"
             xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
             xmlns:admin="http://webns.net/mvcb/"
             xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
             xmlns:content="http://purl.org/rss/1.0/modules/content/">
        <channel>
            <title>
									CatiaWidgets Forum - Recent Posts				            </title>
            <link>https://catiawidgets.net/catiawidgetsforum/</link>
            <description>CatiaWidgets Discussion Board</description>
            <language>en-GB</language>
            <lastBuildDate>Thu, 06 Aug 2026 01:15:51 +0000</lastBuildDate>
            <generator>wpForo</generator>
            <ttl>60</ttl>
							                    <item>
                        <title>Create Publication via Macro</title>
                        <link>https://www.catiawidgets.net/catiawidgetsforum/v6/create-publication-via-macro/#post-194</link>
                        <pubDate>Tue, 23 Dec 2025 11:20:28 +0000</pubDate>
                        <description><![CDATA[HelloTrying desesperatly to CREATE A publication in MAcro Language VBA with the following codeCould someone help me pleaseSub CATMain()Dim EngCntEditor As Object: Set EngCntEditor = CATIA.Ac...]]></description>
                        <content:encoded><![CDATA[<p><strong>Hello<br /></strong>Trying desesperatly to CREATE A publication in MAcro Language VBA with the following code<br />Could someone help me please<br /><br /><br />Sub CATMain()<br />Dim EngCntEditor As Object: Set EngCntEditor = CATIA.ActiveEditor<br /><br />' 1. Accès au service de publication (plus puissant que l'accès par l'objet)<br />Dim simPubService As Object<br />On Error Resume Next<br />Set simPubService = EngCntEditor.GetService("SimPublicationServices")<br />On Error GoTo 0<br /><br />If simPubService Is Nothing Then<br />MsgBox "Le service de publication est indisponible. Vérifiez vos licences."<br />Exit Sub<br />End If<br /><br />' 2. Récupérer l'assemblage racine<br />Dim myProdService As PLMProductService: Set myProdService = EngCntEditor.GetService("PLMProductService")<br />Dim myRootOcc As VPMRootOccurrence: Set myRootOcc = myProdService.RootOccurrence<br />Dim myRootRef As VPMReference: Set myRootRef = myRootOcc.ReferenceRootOccurrenceOf<br /><br /><br />Dim ioCATIA As Application<br />Set ioCATIA = CATIA<br /><br />'Get The Active Object i.e. Root object<br />Dim ioVPMRootOccurence As VPMRootOccurrence<br />Set ioVPMRootOccurence = ioCATIA.ActiveEditor.ActiveObject<br /><br />' Get the Child Occurences i.e. the objects below the root<br />Dim ioVPMOccurences As VPMOccurrences<br />Set ioVPMOccurences = ioVPMRootOccurence.Occurrences<br /><br />' Get the first Child Occurence<br />Dim ioOccurence As VPMOccurrence<br />Set ioOccurence = ioVPMOccurences.Item(1)<br /><br />' Get the VPM Instance from the Child Occurence<br />Dim ioVPMInstance As VPMInstance<br />Set ioVPMInstance = ioOccurence.InstanceOccurrenceOf<br /><br />' Get the VPM Reference from the VPM Instance<br />Dim ioVPMReference As VPMReference<br />Set ioVPMReference = ioVPMInstance.ReferenceInstanceOf<br /><br />' Get the VPM Representation Instances<br />Dim ioVPMRepInstances As VPMRepInstances<br />Set ioVPMRepInstances = ioVPMReference.repInstances<br /><br />' A 3D Part may have multiple reps below it i.e. a Shape and a Drawing<br />' Get the first Representation Instance from the VPM Representation Instances<br />Dim ioVPMRepInstance As VPMRepInstance<br />Set ioVPMRepInstance = ioVPMRepInstances.Item(1)<br /><br />' Get the VPM Representation Reference from the Representation Instance<br />Dim ioVPMRepReference As VPMRepReference<br />Set ioVPMRepReference = ioVPMRepInstance.ReferenceInstanceOf<br /><br />' Get the Part from the VPM Representation Reference<br />Dim ioPart As Part<br />Set ioPart = ioVPMRepReference.GetItem("Part")<br /><br />MsgBox ioPart.axisSystems.Item(2).name<br /><br /><br />' ' 3. Récupérer l'élément sélectionné<br />' Dim mySelection As Object: Set mySelection = EngCntEditor.Selection<br />' If mySelection.Count = 0 Then<br />' MsgBox "Sélectionnez l'axe 'RepTgt' dans l'arbre."<br />' Exit Sub<br />' End If<br /><br /><br /><br />'mySelection.VisProperties.SetRealColor 255, 255, 0, 1 ' Repère en jaune<br /><br /><br /><br /><br />' 4. RÉCUPÉRATION DU LIEN CONTEXTUEL<br />Dim oAxis As Object: Set oAxis = ioPart.axisSystems.Item(2)<br /><br /><br />' On tente de créer une référence contextuelle<br />Dim myRef As Object<br />On Error Resume Next<br />' Set myRef = ioOccurence.CreateReferenceFromObject(oAxis) ' CREATE AN EMPTY PUBLICATION<br />Set myRef = ioPart.axisSystems.Item(1) 'DOESN'T CREATE ANY PUBLICATION<br />On Error GoTo 0<br /><br /><br /><br />' 5. CRÉATION PAR LE SERVICE (Sans passer par la collection)<br />Dim pubName As String: pubName = "PubliRep"<br />Dim newPublication As Object<br /><br />On Error Resume Next<br />' C'est la fonction la plus robuste de l'API 3DEXPERIENCE<br />Set newPublication = simPubService.CreatePublication(myRootRef, myRef, pubName)<br />On Error GoTo 0<br /><br />' 6. VERIFICATION<br />If Not newPublication Is Nothing Then<br />MsgBox "SUCCÈS ! Publication créée via SimPublicationServices."<br />' Rafraîchissement forcé<br /><br />Else<br />MsgBox "Même le service de simulation a échoué." &amp; vbCrLf &amp; _<br />"Vérifiez si l'objet racine (" &amp; myRootRef.GetIdentifier &amp; ") n'est pas verrouillé par un autre utilisateur."<br />End If<br /><br />MsgBox newPublication.name<br /><br />End Sub<br /><br /><br /><br /></p>]]></content:encoded>
						                            <category domain="https://catiawidgets.net/catiawidgetsforum/"></category>                        <dc:creator>Denis Douillet</dc:creator>
                        <guid isPermaLink="true">https://www.catiawidgets.net/catiawidgetsforum/v6/create-publication-via-macro/#post-194</guid>
                    </item>
				                    <item>
                        <title>Fold / Unfold and check perimeter</title>
                        <link>https://www.catiawidgets.net/catiawidgetsforum/main-forum/fold-unfold-and-check-perimeter/#post-6</link>
                        <pubDate>Wed, 07 Feb 2024 13:46:26 +0000</pubDate>
                        <description><![CDATA[I&#039;m using 3dexperience with the MDG (Sheet Metal Design) license to Fold/Unfold materials and then measure its perimeter and export it to Excel, I wanted to know if there was a way to do thi...]]></description>
                        <content:encoded><![CDATA[<pre id="tw-target-text" class="tw-data-text tw-text-large tw-ta" dir="ltr" contenteditable="false" data-placeholder="Tradução" data-ved="2ahUKEwiH6pWrrpmEAxUxqJUCHWklAtAQ3ewLegQIBRAU"><span class="Y2IQFc">I'm using 3dexperience with the MDG (Sheet Metal Design) license to Fold/Unfold materials and then measure its perimeter and export it to Excel, I wanted to know if there was a way to do this in EKL, as I'm still learning) In this case, I would need to create an action that would do this because it would replicate this automation throughout my sector.</span></pre>]]></content:encoded>
						                            <category domain="https://catiawidgets.net/catiawidgetsforum/"></category>                        <dc:creator>gabriel coimbra</dc:creator>
                        <guid isPermaLink="true">https://www.catiawidgets.net/catiawidgetsforum/main-forum/fold-unfold-and-check-perimeter/#post-6</guid>
                    </item>
				                    <item>
                        <title>RE: Python in 3DX/Catia</title>
                        <link>https://www.catiawidgets.net/catiawidgetsforum/3dx/python-in-3dx-catia/#post-5</link>
                        <pubDate>Sun, 12 Nov 2023 17:57:21 +0000</pubDate>
                        <description><![CDATA[Hi Nikolay, my apologies for the seriously late reply.  it&#039;s awesome that you are looking to learn some Python to automate with CATIA!  In my journey, I found Dassault&#039;s automation API guide...]]></description>
                        <content:encoded><![CDATA[
<p>thank you Daniel for all the useful articles published on your site.</p>
<p> </p>
<p>I came across by chance as I have been interested in learning a bit of Python and as an user of Catia was keen to find some info on the subject.</p>
<p> </p>
<p>Regards</p>
<p> </p>
<p>Nikolay</p>
<p></p>
<p> </p>
<p>Hi Nikolay, my apologies for the seriously late reply.  it's awesome that you are looking to learn some Python to automate with CATIA!  In my journey, I found Dassault's automation API guide (included in the CATIA/3DX installation) to be extremely helpful as a starting point.  It's the most thorough source of API information I've found thus far, and includes sections and code examples specific to Python, VBA, and in some cases C.</p>
<p>The guide I'm referring to is "DSYAutomation.chm" and can be found within the code/bin subdirectory of your CATIA installation directory.  In my case, this is the file path, but it may be slightly different depending on your CATIA version: "C:\Program Files\Dassault Systemes\B425\win_b64\code\bin\DSYAutomation.chm"</p>
<p>If you're just getting started with Python, this guide will prove to be a valuable resource for you, as it provides a complete reference of classified methods and properties of all the different objects that the API supports.  In many cases, code examples in the guide are in VBA, but translating to Python shouldn't be extremely difficult if you're familiar with the basics of the language.</p>
<p> </p>
<p>If there is anything specific that you're trying to do and need assistance with, feel free to reach out and I can try to help. Have an amazing day!</p>
<p> </p>]]></content:encoded>
						                            <category domain="https://catiawidgets.net/catiawidgetsforum/"></category>                        <dc:creator>Daniel Koman</dc:creator>
                        <guid isPermaLink="true">https://www.catiawidgets.net/catiawidgetsforum/3dx/python-in-3dx-catia/#post-5</guid>
                    </item>
				                    <item>
                        <title>RE: Parametric AxisSystem through Catia EKL</title>
                        <link>https://www.catiawidgets.net/catiawidgetsforum/ekl/parametric-axissystem-through-catia-ekl/#post-4</link>
                        <pubDate>Sat, 11 Nov 2023 19:03:29 +0000</pubDate>
                        <description><![CDATA[Sorry about the late reply, my site has been a round for many years and your the first to post anything, I&#039;m a little shocked to be honest, thank you.
Great question, in later revisions of ...]]></description>
                        <content:encoded><![CDATA[<p>Sorry about the late reply, my site has been a round for many years and your the first to post anything, I'm a little shocked to be honest, thank you.</p>
<p>Great question, in later revisions of CATIA they did indeed add AxisSystem to the EKL datum objects. I have not tried to create a Datum Axis Systema and then convert it to a Parametric one, but an Axis System is not a geometrical element behind the scenes its a parameter.  I know this is odd but pre-CATIA V5 R14 all geometrical objects were parameters not geometry types.  For what ever reason Axis Systems didn't get converted.</p>
<p>So this is how to convert a point.</p>
<pre contenteditable="false">// ConvertDatumPointtoPointCoord( iPoint : Point ) : Void

Let oGSMPoint ( GSMPoint )
Set oGSMPoint = iPoint
oGSMPoint.PointType =  "Coordinates"
  
Let oGSMPointCoord( GSMPointCoord )
Set oGSMPointCoord = oGSMPoint
oGSMPointCoord.X = iPoint-&gt;coord(1)
oGSMPointCoord.Y = iPoint-&gt;coord(2)
oGSMPointCoord.Z = iPoint-&gt;coord(3)</pre>
<p>If the API is there in the latest release, and I will check on Monday, I would expect something similar to this.</p>
<pre contenteditable="false">// ConvertDatumAxisSystem( iAxisSystem : AxisSystem ) : Void

Let oGSMAxisSystem ( GSMAxisSystem)
Set oGSMAxisSystem = iAxisSystem
oGSMAxisSystem.AxisSystemType =  "Standard"

Let oGSMAxisSystemStandard ( GSMAxisSystemStandard )
Set oGSMAxisSystemStandard = oGSMAxisSystem
Set oGSMAxisSystemStandard.X = iAxisSystem.X
Set oGSMAxisSystemStandard.Y = iAxisSystem.Y
Set oGSMAxisSystemStandard.Z = iAxisSystem.Z</pre>
<p> </p>]]></content:encoded>
						                            <category domain="https://catiawidgets.net/catiawidgetsforum/"></category>                        <dc:creator>Admin</dc:creator>
                        <guid isPermaLink="true">https://www.catiawidgets.net/catiawidgetsforum/ekl/parametric-axissystem-through-catia-ekl/#post-4</guid>
                    </item>
				                    <item>
                        <title>RE: Python in 3DX/Catia</title>
                        <link>https://www.catiawidgets.net/catiawidgetsforum/3dx/python-in-3dx-catia/#post-3</link>
                        <pubDate>Sat, 11 Nov 2023 18:50:10 +0000</pubDate>
                        <description><![CDATA[Let me get Dan on this Post, he is a CATIA python wizard, stand by.]]></description>
                        <content:encoded><![CDATA[<p>Let me get Dan on this Post, he is a CATIA python wizard, stand by.</p>]]></content:encoded>
						                            <category domain="https://catiawidgets.net/catiawidgetsforum/"></category>                        <dc:creator>Admin</dc:creator>
                        <guid isPermaLink="true">https://www.catiawidgets.net/catiawidgetsforum/3dx/python-in-3dx-catia/#post-3</guid>
                    </item>
				                    <item>
                        <title>Parametric AxisSystem through Catia EKL</title>
                        <link>https://www.catiawidgets.net/catiawidgetsforum/ekl/parametric-axissystem-through-catia-ekl/#post-2</link>
                        <pubDate>Sat, 05 Aug 2023 02:19:38 +0000</pubDate>
                        <description><![CDATA[I have seen posts from the author in the site for creating parametric datum elements (points&amp;lines), but is there any way we can create a parametric axis system through EKL.]]></description>
                        <content:encoded><![CDATA[<p>I have seen posts from the author in the site for creating parametric datum elements (points&amp;lines), but is there any way we can create a parametric axis system through EKL.</p>]]></content:encoded>
						                            <category domain="https://catiawidgets.net/catiawidgetsforum/"></category>                        <dc:creator>Prasanna Muthuramalingam</dc:creator>
                        <guid isPermaLink="true">https://www.catiawidgets.net/catiawidgetsforum/ekl/parametric-axissystem-through-catia-ekl/#post-2</guid>
                    </item>
				                    <item>
                        <title>Python in 3DX/Catia</title>
                        <link>https://www.catiawidgets.net/catiawidgetsforum/3dx/python-in-3dx-catia/#post-1</link>
                        <pubDate>Thu, 12 Jan 2023 13:43:25 +0000</pubDate>
                        <description><![CDATA[thank you Daniel for all the useful articles published on your site.
 
I came across by chance as I have been interested in learning a bit of Python and as an user of Catia was keen to fin...]]></description>
                        <content:encoded><![CDATA[<p>thank you Daniel for all the useful articles published on your site.</p>
<p> </p>
<p>I came across by chance as I have been interested in learning a bit of Python and as an user of Catia was keen to find some info on the subject.</p>
<p> </p>
<p>Regards</p>
<p> </p>
<p>Nikolay</p>]]></content:encoded>
						                            <category domain="https://catiawidgets.net/catiawidgetsforum/"></category>                        <dc:creator>Nikolay Salutski</dc:creator>
                        <guid isPermaLink="true">https://www.catiawidgets.net/catiawidgetsforum/3dx/python-in-3dx-catia/#post-1</guid>
                    </item>
							        </channel>
        </rss>
		