text template that includes promted input
text template that includes promted input
(OP)
Hi all. I'd like to be able to place, for example, the following text:
"ALL DIMENSIONS +/-0.010" UNLESS OTHERWISE SPECIFIED"
where the '+/-0.010" ' is the result of a prompt.
I have just started to become familiar with text templates but haven't found a way.
Nick
"ALL DIMENSIONS +/-0.010" UNLESS OTHERWISE SPECIFIED"
where the '+/-0.010" ' is the result of a prompt.
I have just started to become familiar with text templates but haven't found a way.
Nick
Light structural commercial aircraft parts
PCDMIS 4.3 CAD++, CATIA V5 R20, NX6
APM Consortium Inc.
Cambridge Ontario, Canada





RE: text template that includes promted input
I believe if you will use a CATScript (or vba) it can be done without text templates.
Regards
Fernando
https://picasaweb.google.com/102257836106335725208
RE: text template that includes promted input
Any idea why macros won't record anything?
Nick
Light structural commercial aircraft parts
PCDMIS 4.3 CAD++, CATIA V5 R20, NX6
APM Consortium Inc.
Cambridge Ontario, Canada
RE: text template that includes promted input
Ferdo has created a masterpiece of script examples. I clip little bits form it all the time.
Link
Regards,
Derek
Win XP64
R20/21, 3DVIA Composer 2012, ST R20
Dell T7400 16GB Ram
Quadro FX 4800 - 1.5GB
RE: text template that includes promted input
Nick
Light structural commercial aircraft parts
PCDMIS 4.3 CAD++, CATIA V5 R20, NX6
APM Consortium Inc.
Cambridge Ontario, Canada
RE: text template that includes promted input
Try this one, it should be the Portable Script Center V2.0
http://www.eng-tips.com/viewthread.cfm?qid=298847
Win XP64
R20/21, 3DVIA Composer 2012, ST R20
Dell T7400 16GB Ram
Quadro FX 4800 - 1.5GB
RE: text template that includes promted input
If someone could even get me started on what this script might look like, I might be able to fumble through with VBA's auto fill function (lot's of guessing...)
Nick
Light structural commercial aircraft parts
PCDMIS 4.3 CAD++, CATIA V5 R20, NX6
APM Consortium Inc.
Cambridge Ontario, Canada
RE: text template that includes promted input
A quick, dirty solution to your first problem, which obviously can be improved (user should be able to pick a point in 2D drawing, also some input boxes to let user write what he wants, but this is not the case in the bellow CATScript). For your second problem I have to think...but I strongly encourage everyone to try to develop a code, post it and see together what can be done to improve the code (just an info, I'm not a programmer so believe me I'm also learning from others).
And maybe a new post it would be better.
Sub CATMain()
Set drawingDocument1 = CATIA.ActiveDocument
Set drawingSheets1 = drawingDocument1.Sheets
Set drawingSheet1 = drawingSheets1.Item("Sheet.1")
Set ActiveView = drawingSheet1.Views.Item(1)
Dim collection_textes As DrawingTexts
Set collection_textes = ActiveView.Texts
Dim Legende_texte As DrawingText
b = "ALL DIMENSIONS"
c= " +/-0.010" & "in"
d = " UNLESS OTHERWISE SPECIFIED"
Set Legende_texte = collection_textes.Add(b & c & d, 100, 100)
Legende_texte.SetFontSize 0, 0, 3.5
End Sub
Regards
Fernando
https://picasaweb.google.com/102257836106335725208